码迷,mamicode.com
首页 > 移动开发 > 详细

iOS第三方(ActionSheet)-JTSActionSheet

时间:2015-06-18 13:12:02      阅读:195      评论:0      收藏:0      [点我收藏+]

标签:

外观和系统的基本一样

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

标签:

原文地址:http://www.cnblogs.com/hxwj/p/4585504.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!