SGActionViewiOS 弹出视图控件

联合创作 · 2023-09-27 02:36

介绍

SGActionView提供三种弹出视图:

  • SGAlertMenu,类似于UIAlertView的提示框。

  • SGGridMenu,多用于选择服务、分享等操作,类似UIActivityViewController的功能
    grid

  • SGSheetMenu,一个选项列表,可以设置默认值。

使用

引入SGActionView.h  

提示框:

[SGActionView showAlertWithTitle:@"Title"
                         message:@"Message"
                     buttonTitle:@"Cancel"
                  selectedHandle:nil];

选项列表:

[SGActionView showSheetWithTitle:@"Sheet View"
                       itemTitles:@[ @"Wedding Bell", @"I'm Yours", @"When I was your mam" ]
                   itemSubTitles:@[ @"Depapepe - Let's go!!!", @"Jason Mraz", @"Bruno Mars" ]
                   selectedIndex:0
                  selectedHandle:nil];

分享:

[SGActionView showGridMenuWithTitle:@"Grid View"
                         itemTitles:@[ @"Facebook", @"Twitter", @"Google+", @"Linkedin",
                                       @"weibo", @"wechat", @"Pocket", @"Dropbox" ]
                             images:@[ [UIImage imageNamed:@"facebook"],
                                       [UIImage imageNamed:@"twitter"],
                                       [UIImage imageNamed:@"googleplus"],
                                       [UIImage imageNamed:@"linkedin"],
                                       [UIImage imageNamed:@"weibo"],
                                       [UIImage imageNamed:@"wechat"],
                                       [UIImage imageNamed:@"pocket"],
                                       [UIImage imageNamed:@"dropbox"]]
                     selectedHandle:nil];
浏览 10
点赞
评论
收藏
分享

手机扫一扫分享

编辑 分享
举报
评论
图片
表情
推荐
点赞
评论
收藏
分享

手机扫一扫分享

编辑 分享
举报