zoukankan      html  css  js  c++  java
  • 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!)
  • 相关阅读:
    Mysql 单表查询-排序-分页-group by初识
    Mysql 单表查询where初识
    Mysql 库表操作初识
    Mysql 常见数据类型及约束
    数据库 初识
    Mysql 游标初识
    Mysql 控制结构初识
    Mysql 存储过程初识
    单链表-Python实现-jupyter->markdown 格式测试
    MySQL 触发器学习-markdown->html 格式测试
  • 原文地址:https://www.cnblogs.com/qzp2014/p/4273968.html
Copyright © 2011-2022 走看看