iOS第三方(ActionSheet)-JTSActionSheet

外观和系统的基本一样

github地址:https://github.com/jaredsinclair/JTSActionSheet

百度云下载: http://pan.baidu.com/s/1qWyZwjM

使用方法:

#import "JTSActionSheet.h"
 JTSActionSheetTheme *theme = [JTSActionSheetTheme defaultTheme];
    theme.titleColor = [Common colorWithTheme];
    theme.normalButtonColor = [Common colorWithTheme];
    // Setup your buttons
    
    JTSActionSheetItem *buyAll = [JTSActionSheetItem itemWithTitle:@"拍照" action:^{
        [self initCamera];
    } isDestructive:NO];
    
    JTSActionSheetItem *deleteAll = [JTSActionSheetItem itemWithTitle:@"从相册选择" action:^{
        [self initPhoto];
    } isDestructive:NO];
    
    JTSActionSheetItem *cancel = [JTSActionSheetItem itemWithTitle:@"取消" action:^{
        
    } isDestructive:NO];
    
    JTSActionSheet *sheet = [[JTSActionSheet alloc] initWithTheme:theme
                                                            title:nil
                                                      actionItems:@[buyAll, deleteAll]
                                                       cancelItem:cancel];
    [sheet showInView:self.view];

 效果图:

 

 

 

posted @ 2015-06-18 12:03  幻想无极  阅读(669)  评论(0编辑  收藏  举报