zoukankan      html  css  js  c++  java
  • ios的一些经验记录1

    1、UITextAlignment  ---> NSTextAlignment

    2、找不到segue  

    viewcontroller 与segue要对应

    3、标题栏用NavigationControler + ViewController

    4、如果模拟器不可运行,而真机可以运行,可能是库的require 和 optional设置错误

    5、UIStoryBoard 载入的ViewController 标识和类名 如果没有对应,会崩溃。

    6、UIBarButtonItem  用 NavigationBar  NavigationItem

    7、autolayout 自动布局时可以用 multipiler来设置父子控件的排版,如果3:1 则父占3,子占1

    8、加载storybaord中单独的view,view要自定义 controller.view

    9、如果想在tableview 上有空白,不能用layoutguide

    10、自定义表格https://cocoapods.org/pods/SegmentedController

    11、

    swift 和oc 使用函数做参数的格式有点不同

    swift:

    a、直接用函数做参数

    在函数参数里写明类型即可。 

    b、闭包,格式为

    { (parameters) -> return type in
    statements
    }

    oc:

    a、命名Block

    声明Block的类型

    (return type) (^blockName) (parameters);

    b、匿名block

    (^blockName) (parameters){

    statements

    }

    12、UIActionSheet多项弹出框

    13、Viewbytag
    14、mac 的快捷键一般情况对话框的确认键是空格,有时是command+enter,对话框的三个按钮 退出 command+backspace,取消 esc,确认 enter,

    15、ios程序一启动就崩溃,有可能是证书过期,证书混乱、或过期





  • 相关阅读:
    Spark安装
    JavaScript encodeURIComponent()
    Kafka分布式:ZooKeeper扩展
    Kafka特性
    Kafka消息topic分区
    Kafka消息文件存储
    哈希表
    sizeof
    pytest_demo_实战2_fixture应用
    pytest_demo_实战1
  • 原文地址:https://www.cnblogs.com/xdao/p/ios_tips1.html
Copyright © 2011-2022 走看看