以前不太使用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,注意对类型。

iOS 使用Storyboard 和 xib时的一些知识的更多相关文章

  1. ios 在storyboard 和 xib中,显示自定义view的预览效果

    发现FSCalendar这个控件能在xib中显示预览效果,是怎么实现的呢?其中涉及的知识又有哪些? 主要就是IBInspectable 和 IB_DESIGNABLE 先看 IBInspectable ...

  2. iOS之分别使用代码和storyboard、xib为控件设置圆角(以按钮为例)

    首先我们看一下代码是如何给按钮设置圆角的: 我们再来看看如何在storyboard或xib中给按钮设置圆角: 1.在storyboard或xib中添加按钮后,设置标题和背景色,做好约束: 2.点击 S ...

  3. (iOS)Storyboard/xib小技巧

    1.选择被view覆盖住的view 当你想直接在view中选择自己想要的元素时,但是又碍于一个view上叠加的元素太多很难直接选中,那么在这时,你同时按住键盘上的shift和 control键,然后在 ...

  4. iOS 界面 之 EALayout 无需反复编译,可视化实时界面,告别Storyboard AutoLayout Xib等等烦人的工具

    http://blog.csdn.net/fatherhui iOS开发,EALayout 无需反复编译,可视化实时界面,告别Storyboard AutoLayout Xib等等烦人的工具 EALa ...

  5. iOS之nib、xib及storyboard的区别及storyboard的加载过程

    先讲述下nib, nib是3.0版本以前的产物,在终端下我们可以看到,NIB其实是一个文件夹,里面有可执行的二进制文件: 区分xib和storyboard的区别? 不同点: 1> 无论nib也好 ...

  6. ios UILabel在storyBoard或xib中如何在每行文字不显示完就换行

    大家知道怎么用代码让label中的文字换行,只需要 label.numberOfLines = 0; label.text = @"这是第一行啦啦啦啦,\n这是第二行啦啦,\n这是第三行&q ...

  7. iOS开发UI篇—xib的简单使用

    iOS开发UI篇—xib的简单使用 一.简单介绍 xib和storyboard的比较,一个轻量级一个重量级. 共同点: 都用来描述软件界面 都用Interface Builder工具来编辑 不同点: ...

  8. [BS-13] 创建和注册UITableViewCell及Storyboard和Xib区别

    创建和注册UITableViewCell及Storyboard和Xib区别 // 界面创建完成被调用 - (void)viewDidLoad { [super viewDidLoad]; /** 如果 ...

  9. IOS中 类扩展 xib

    一.类扩展(class extension,匿名分类) .格式 @interface 类名 () { // 成员变量... } // 方法声明... @end .作用 > 写在.m文件中 > ...

随机推荐

  1. Spring-dispatcherServlet

    对于分析SpringMVC,其实就是遵循Servlet世界里最简单的法则“init-service-destroy”. 对于分析SpringMVC的初始化流程,就是分析DispatcherServle ...

  2. Lucene -- 实时索引

    lucene的实时搜索可以分成:实时和近实时的搜索. 实时只能依靠内存了. 近实时可以用lucene中提供org.apache.lucene.index.DirectoryReader.open(In ...

  3. 什么时候用Vector, 什么时候改用ArrayList?

    转自:http://www.cnblogs.com/langtianya/archive/2012/08/28/2659787.html 书得到的信息好像是Vector是从java1开始就有了,Arr ...

  4. 【UVA 1451】Average

    题 题意 求长度为n的01串中1占总长(大于L)的比例最大的一个子串起点和终点. 分析 前缀和s[i]保存前i个数有几个1,[j+1,i] 这段区间1的比例就是(s[i]-s[j])/(i-j),于是 ...

  5. 【HDU 2160】母猪的故事

    题 Description 话说现在猪肉价格这么贵,著名的ACBoy 0068 也开始了养猪生活.说来也奇怪,他养的猪一出生第二天开始就能每天中午生一只小猪,而且生下来的竟然都是母猪. 不过光生小猪也 ...

  6. BZOJ-3668 起床困难综合症 位运算+贪心

    faebdc学长杂题选讲中的题目...还是蛮简单的...位运算写的不熟练... 3668: [Noi2014]起床困难综合症 Time Limit: 10 Sec Memory Limit: 512 ...

  7. UVa247 Calling Circles

    Time Limit: 3000MS     64bit IO Format: %lld & %llu map存人名,floyd传递闭包,DFS查询. 输出答案的逗号后面还有个空格,被坑到了2 ...

  8. SGU 275 To xor or not to xor

    time limit per test: 0.25 sec. memory limit per test: 65536 KB input: standard output: standard The ...

  9. Codeforces 85D Sum of Medians

    传送门 D. Sum of Medians time limit per test 3 seconds memory limit per test 256 megabytes input standa ...

  10. Swift开发学习-02 变量和常量

    本教程是笔者在自学IOS/Swift知识的总结,适用于通过对Objictive C编程的运用,并需要了解基于iOS程序的iPhone和iPad的程序员.做一个有bigger的’攻城狮‘,有尊严的工作, ...