码迷,mamicode.com
首页 > 其他好文 > 详细

xib文件的使用

时间:2015-07-28 23:02:12      阅读:112      评论:0      收藏:0      [点我收藏+]

标签:

作用:xib文件可以用来描述某一块局部的UI界面

xib加载

1> 

NSBundle *bundel = [[NSBundle mainBundle] loadNibName:@"xxx.xib" owner:nil options:nil];

这个方法会创建xib中所有对象,并且将对象按顺序方法objs数组中

2>

bundle 参数可以为nil,默认就是main bundle

UINib *nib = [[UINib nibWithNibName:@"xxx.xib" bundle:[NSBundle mainBundle]];

NSArray *objs = [nib instantiateWithOwner:nil options:nil];

xib文件的使用

标签:

原文地址:http://www.cnblogs.com/YTzZ/p/4684423.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!