UIActionSheet
2016-05-24 10:53
477 查看
down vote | You need to use a UIActionSheet. First you need to add UIActionSheetDelegateto your ViewController.h file. Then you can reference an actionsheet with: UIActionSheet *popup = [[UIActionSheet alloc] initWithTitle:@"Select Sharing option:" delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil otherButtonTitles: @"Share on Facebook", @"Share on Twitter", @"Share via E-mail", @"Save to Camera Roll", @"Rate this App", nil]; popup.tag = 1; [popup showInView:self.view]; Then you have to handle each of the calls. - (void)actionSheet:(UIActionSheet *)popup clickedButtonAtIndex:(NSInteger)buttonIndex { switch (popup.tag) { case 1: { switch (buttonIndex) { case 0: [self FBShare]; break; case 1: [self TwitterShare]; break; case 2: [self emailContent]; break; case 3: [self saveContent]; break; case 4: [self rateAppYes]; break; default: break; } break; } default: break; } } |
相关文章推荐
- IDEA菜单项中Compile、Make和Build的区别
- iOS开发UI篇-UITabBarController简单介绍
- 发现Vue.js做前端交互不错,非常轻量级
- [UIScreen MainScreen].bounds.size获取屏幕尺寸不准确
- UITextField使用方法
- MySQL增加Sequence管理功能
- 开源UI
- HDU 4667 Building Fence(求凸包的周长)
- UESTC 1215 (思维题 旋转)
- iOS学习之—— dequeueReusableCellWithIdentifier
- POJ 2478 Farey Sequence(欧拉函数前n项和)
- iOS学习之——UIImagePickerController从拍照、图库、相册获取图片
- iOS UITableViewCell 表格式图滑动删除
- iOS-UIView属性之clipsToBounds
- iOS学习之—— UIViewAutoresizing(自动布局)
- 图片适应UIImageView
- iOS学习之—— UIPageViewController
- 跨线程访问UI
- liferay-ui:search-container reset cur page 当点列排序时,把当前页号重置为1.
- easyui在当前tab中直接加载url