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!)
  • 相关阅读:
    CSS样式—绝对定位(absolute)与相对定位(relative)的区别(图示)
    firefox与IE透明度(opacity)设置区别
    nopCommerce学习之架构(三)
    nopCommerce学习之程序包(四)
    Hadoop 部署
    nopCommerce学习之汉化(二)
    PetShop 首页
    nopCommerce学习之安装配置(一)
    C# 中ToString()的用法
    对象的当前状态使该操作无效
  • 原文地址:https://www.cnblogs.com/qzp2014/p/4273968.html
Copyright © 2011-2022 走看看