How to loadview
来源:互联网 发布:linux io性能分析 编辑:程序博客网 时间:2024/06/06 04:00
- (void)loadView{// If a nibName was passed to initWithNibName:bundle:...if ([self nibName]) {// Load that nib file, with ourselves as the file's owner, thus connecting// the view outlet to the view in the nib[[NSBundle mainBundle] loadNibNamed:[self nibName] owner:self options:nil];}else {// What is the name of this class?NSString *className = NSStringFromClass([self class]);// What's the full path of the nib file?NSString *nibPath = [[NSBundle mainBundle] pathForResource:classNameofType:@"nib"];// If there really is a nib file at that path, load itif ([[NSFileManager defaultManager] fileExistsAtPath:nibPath]) {[[NSBundle mainBundle] loadNibNamed:className owner:self options:nil];}else {// If there is no nib, just create a blank UIView and set it as the viewUIView *view = [[UIView alloc] initWithFrame:CGRectZero];[self setView:view];[view release];}}}
这个是基本的过程,有助于理解loadview
0 0
- How to loadview
- loadView
- loadView
- loadView
- loadView
- how to ...
- Siebel HOW TO: How to Deactivate Workflow
- Siebel HOW TO: How to create Products?
- How to CVS to Eclipse
- How to talk to anyone
- How To...Deploy to IIS7
- How to hate Microsoft?
- How To Use DataGird
- How to Install Orabm
- How to research
- How to read?
- how to use typedef
- Google How to
- win7系统自动休眠设置
- iOS7中的多任务
- 持续集成+持续部署(二)基于Jenkins 快速搭建持续集成环境
- 关于手机bootloader和recovery的介绍
- Activity子线程修改UI
- How to loadview
- 往Eclipse上添加CDT
- 关于Android中的armeabi 和armeabi-v7a
- 在内容长页处动态增加滚动的返回头部图标
- Android中的Handler的post方法详解
- 哈哈。我也开通博客了。。。
- 更轻量的 View Controllers
- cocos2d-x 源码剖析(18)
- PHP_PDO