外观和系统的基本一样

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

 效果图:

 iOS第三方(ActionSheet)-JTSActionSheet

 

 

相关文章:

  • 2022-12-23
  • 2021-11-30
  • 2021-07-22
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-04-18
  • 2021-04-24
猜你喜欢
  • 2022-12-23
  • 2021-08-26
  • 2022-12-23
  • 2021-11-07
  • 2022-12-23
  • 2022-01-07
相关资源
相似解决方案