zoukankan      html  css  js  c++  java
  • iOS 使用Storyboard 和 xib时的一些知识

    以前不太使用xib和storyboard进行布局,后来在工作中参与到了一个项目的维护工作,那个项目就是使用stroyboard的,再加上xcode5对stroyboard的大力支持,就在这里对于使用stroyboard和xib的一些知识进行总结。

    请参阅官方文档:

    Using Unwind Segues

    先说说segue,中文翻译为继续,这个东西,稍微有点Android的Intent的意思,但是它的功能很单一。

    1. A UIStoryboardSegue object is responsible for performing the visual transition between two view controllers.  就是负责storyboard中的controller的跳转用的。

    2. You do not create segue objects directly. Instead, the storyboard runtime creates them when it must perform a segue between two view controllers. 不建议手动创建,会由storyboard自动创建。

    3. You can still initiate a segue programmatically using the performSegueWithIdentifier:sender: method of UIViewController if you want. You might do so to initiate a segue from a source that was added programmatically and therefore not available in Interface Builder. 也可以手动建立segue,不用在interface builder中建立。

    4. To use your custom segue, create a segue line between the appropriate view controllers in Interface Builder and set its type to Custom in the inspector; you must also specify the class name of the segue to use in the inspector.也可以在xib中使用自定义的segue,注意对类型。

  • 相关阅读:
    Android中GC_EXTERNAL_ALLOC的含义
    Phonegap开发的前后台数据交互
    代码管理工具TortoiseSVN
    14款响应式前端开发框架
    简化工作流程,10款必备的HTML5开发工具
    [C#.net]处理UTF-8文件乱码
    [Oracle]ORA-14400:插入的分区关键字未映射到任何分区
    [网络]10M、100M、1000M网线的水晶头接法
    [Office]Execl取消保护密码
    SLI的相关学习
  • 原文地址:https://www.cnblogs.com/breezemist/p/3421794.html
Copyright © 2011-2022 走看看