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];

 效果图:

 

 

 

你可能感兴趣的:(action)