initWithNibName
来源:互联网 发布:多个表格数据自动汇总 编辑:程序博客网 时间:2024/06/04 19:14
The lifecycle starts with alloc and initialization of course
- (id)initWithNibName:(NSString *)nibName bundle:(NSBundle *)aBundle;
Can I build a UIViewController ’s view in code (i.e. w/o a .xib)?
Yes.
If no .xib is found using mechanism above, UIViewController will call - (void)loadView on itself.
loadView ’s implementation MUST set the view property in the UIViewController .
Don’t implement loadView AND specify a .xib file (it’s undefined what this would mean). Stanford
This is UIViewController ’s d e s i g n at e d i n it i a l i z e r.
The UIViewController tries to get its view from the specified .xib file called nibName.
If nibName is nil , it uses the name of the class as the nibName ( HappinessViewController.xib).
The bundle allows you to specify one of a number of different .xib files (localization).
We’ll cover NSBundle later in the course when we talk about localization.
Passing nil for aBundle basically means “look in the Resources folder from Xcode.”
Initializing UIViewController with init is very common, it means nibName is nil & aBundle is ni
- initWithNibName
- initWithNibName
- initWithNibName、initWithCoder、awakeFromNib、initWithNibName、loadNibNamed
- initWithNibName的初始化问题
- initwithNibName不能初始化wiew
- initWithNibName/awakeFromNib/initWithCoder
- initWithNibName的初始化问题
- initwithNibName不能初始化wiew
- 一句话小计 initWithNibName
- 一句话小计:initWithNibName
- initWithRootViewController、initWithStyle、initWithNibName
- initWithNibName/awakeFromNib/initWithCoder
- initWithNibName 和 init 关系
- initWithNibName和viewDidLoad
- initWithNibName 和 init 关系
- initWithNibName initWithCoder awakeFromNib
- initWithNibName,initWithCoder,initWithFrame
- initWithNibName:方法什么时候调用
- NYOJ - 对称排序
- ubuntu10.04下python相关问题
- POJ 1144 求割点
- 信号量 互斥锁 条件变量的区别
- 单词串联记忆 - 2
- initWithNibName
- HTML 一天总结
- 介绍几个小函数给大家
- 真机编译错误:Command /usr/bin/codesign failed with exit
- Eclipse中vi插件的常用快捷键
- myeclipse自动提醒
- tcp短连接TIME_WAIT问题解决方法大全(1)——高屋建瓴
- Linux下shell的使用
- C# Winform程序设置登录窗体先启动