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!)
  • 相关阅读:
    Yii2 框架目录
    实现超链接在本页面的跳转
    操作系统
    shell笔记
    软RAID5制作流程
    nginx学习之简化安装篇(一)
    Javascript中实现继承的方式
    JavaScript中的函数和C#中的匿名函数(委托、lambda表达式)
    JavaScript中变量、执行环境、作用域与C#中的异同
    Javascript与C#对变量的处理方式
  • 原文地址:https://www.cnblogs.com/qzp2014/p/4273968.html
Copyright © 2011-2022 走看看