UIActionSheet的常用方法
enum UIActionSheetStyle : Int { case Automatic // take appearance from toolbar style otherwise uses 'default'
case Default //默认风格:灰色背景上显示白色文字
case BlackTranslucent ////透明黑色背景,白色文字
case BlackOpaque // //纯黑背景,白色文字
}
//初始化,标题,代理,取消按钮,销毁按钮
init(title: String?, delegate: UIActionSheetDelegate?, cancelButtonTitle: String?, destructiveButtonTitle: String?) unowned(unsafe) var delegate: UIActionSheetDelegate?
var title: String
//风格
var actionSheetStyle: UIActionSheetStyle
//添加按钮
func addButtonWithTitle(title: String) -> Int
// 返回 buttonIndex位置的按钮标题
func buttonTitleAtIndex(buttonIndex: Int) -> String
//获取有多个按钮
var numberOfButtons: Int { get }
//取消按钮的下标
var cancelButtonIndex: Int
//销毁按钮的下标
var destructiveButtonIndex: Int
//第一个其他按钮的下标
var firstOtherButtonIndex: Int { get }
var visible: Bool { get }
//showInview可能会导致弹出菜单被toolbar挡住,最下面的按钮不一定能接受的touch事件,showFromToolbar 是在toolbar上方弹出,就不会有这个问题
//在toolbar上面显示
func showFromToolbar(view: UIToolbar!)
func showFromTabBar(view: UITabBar!)
@availability(iOS, introduced=3.2)
func showFromBarButtonItem(item: UIBarButtonItem!, animated: Bool)
@availability(iOS, introduced=3.2)
func showFromRect(rect: CGRect, inView view: UIView!, animated: Bool)
func showInView(view: UIView!)
UIActionSheet的常用方法的更多相关文章
- UIAlertView 与 UIActionSheet (提示用户)的使用方法
UIAlertView 提示用户 帮助用户选择框 // UIAlertView *alterView = [[UIAlertView alloc] initWithTitle:@"警 ...
- IOS中UIActionSheet使用方法详解
一.初始化方法 - (instancetype)initWithTitle:(NSString *)title delegate:(id<UIActionSheetDelegate>)de ...
- 前端开发:Javascript中的数组,常用方法解析
前端开发:Javascript中的数组,常用方法解析 前言 Array是Javascript构成的一个重要的部分,它可以用来存储字符串.对象.函数.Number,它是非常强大的.因此深入了解Array ...
- Jquery元素选取、常用方法
一:常用的选择器:(李昌辉) 基本选择器 $("#myDiv") //匹配唯一的具有此id值的元素 $("div") //匹配指定名称的所有元素 $(" ...
- python浅谈正则的常用方法
python浅谈正则的常用方法覆盖范围70%以上 上一次很多朋友写文字屏蔽说到要用正则表达,其实不是我不想用(我正则用得不是很多,看过我之前爬虫的都知道,我直接用BeautifulSoup的网页标签去 ...
- C# Webbrowser 常用方法及多线程调用
设置控件的值 /// <summary> /// 根据ID,NAME双重判断并设置值 /// </summary> /// <param name="tagNa ...
- list,tuple,dict,set常用方法
Python中list,tuple,dict,set常用方法 collections模块提供的其它有用扩展类型 from collections import Counter from collect ...
- 记录yii2-imagine几个常用方法
记录yii2-imagine几个常用方法: //压缩 Image::thumbnail('@webroot/img/test-image.jpg', 120, 120)->save(Yii::g ...
- 弹框控件 UIAlertView UIActionSheet
// 创建弹框 从底部弹出,一般用于危险操作 UIActionSheet *sheet = [[UIActionSheet alloc] initWithTitle:@"恭喜通关" ...
随机推荐
- $Django 站点:样式--文章--分类文章--文章详情--文章评论点赞--文章评论点赞统计(数据库优化)
<h3>个人站点下的</h3> 知识点 url (r'(?P<username>\w+)/p/(?P<id>\d+)', xiangxi,name='x ...
- Centos、Ubuntu开启命令模式
由于安装的虚拟机本来就比较卡,开机加载图形界面,会变的更卡,使用下面的命令可将图形界面关闭. centos: 开机以命令模式启动,执行: systemctl set-default multi-use ...
- springcloud-2:服务中心(1)
环境:springboot 2.0.0 + springcloud Finchley.M9 pom.xml: <?xml version="1.0" encoding=&qu ...
- SQL Server 之 内部连接
1.内部联接 2.外部联接 外部联接扩展了内部联接的功能,会把内联接中删除表源中的一些保留下来,由于保存下来的行不同,可将外部联接分为左联接和右联接. 2.1左联接: 如果左表的某一行在右表中没有匹配 ...
- RocketMQ实战快速入门
转自:https://www.jianshu.com/p/824066d70da8 一.RocketMQ 是什么 Github 上关于 RocketMQ 的介绍:RcoketMQ 是一款低延 ...
- Mysql 递归获取多重数组数据
多重数据 $data ,获取顶级下的所有下级id $data array:3 [▼ 0 => array:7 [▼ "id" => 1 "created_at ...
- 大数据python词频统计之hdfs分发-cacheFile
-cacheFile 分发,文件事先上传至Hdfs上,分发的是一个文件 1.找一篇文章The_Man_of_Property.txt: He was proud of him! He could no ...
- Net 4.5 WebSocket 在 Windows 7, Windows 8 and Server 2012上的比较
.Net 4.5 WebSocket Server Running on Windows 7? Net 4.5 WebSocket Server 可以运行在 Windows 7,但是Net 4.5的 ...
- Centos 7.3下 Linux For SQL Server安装及配置介绍
Centos 7.3下 Linux For SQL Server安装及配置介绍 高文龙关注13人评论2828人阅读2017-03-05 21:46:21 Centos 7.3下Linux For SQ ...
- Confluence 6 订阅所应用的所有小工具
你可以从你的 Jira, Bamboo,FishEye 或 Crucible 站点中订阅所有的小工具到你的 Confluence 小工具目录中.用户可以为他们的页面查找和选择小工具. 希望订阅其他站点 ...