1.使用xib重用 //ios6 之后推荐大家使用的重用方式 //动态的使用self获得当前类名,来作为唯一的标示 NSString * identifier = NSStringFromClass([self class]); UINib * nib = [UINib nibWithNibName ...
分类:
其他好文 时间:
2016-07-12 15:11:59
阅读次数:
123
一、 大体流程: (loadView/nib)文件来加载view到内存-->viewDidLoad函数进一步初始化这些view-->内存不足时, 调用viewDidUnload函数释放views-->当需要使用view时又回到第一步loadView:永远不要主导调用这个函数。viewControll ...
分类:
其他好文 时间:
2016-06-22 06:52:22
阅读次数:
97
If you get the following error when you’ve created a new class in Xcode and you’ve choose also to create nib file and you try to connect for example a ...
分类:
其他好文 时间:
2016-06-18 19:51:47
阅读次数:
246
注意要 -- 注册 xib 2.从xib 创建tableViewCell 可以在创建tableview的时候,直接 注册nib 这样你在- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSI ...
分类:
其他好文 时间:
2016-06-17 19:32:56
阅读次数:
319
转载自: http://objccn.io/issue-9-3/ 一个应用在进行多语言本地化的时候涉及到大量的工作。因为这一期的主题是字符串,所以本文主要探讨字符串的本地化。字符串本地化有两种方法:修改代码或修改 nib 文件和 storyboard。本文将专注于通过代码实现字符串的本地化。 NSL ...
分类:
其他好文 时间:
2016-06-17 19:22:35
阅读次数:
704
iOS中的bundle用来保存图片、plist文件、nib文件、国际化文件等资源文件的,根据其应用分为OS X下的bundle工程[1]或target、bundle文件。 bundle工程的创建参考文献1和文献2,使用bundle工程注意要先创建Workspace,然后再创建主工程,然后再创建bun ...
分类:
移动开发 时间:
2016-06-17 19:02:46
阅读次数:
192
1. 实例化 alloc/init, initWithNibName 2.awakeFromNib 从nib创建Controller对象 3.get/set outlets 4. viewDidLoad 5.(几何内容确定时 才进入)viewWill/DidLayoutSubViews 6.view ...
分类:
其他好文 时间:
2016-06-16 01:25:43
阅读次数:
115
/** * 打开二维码 扫描 */ -(void)openCaptureMetada{ // Do any additional setup after loading the view, typically from a nib. //获取摄像设备 AVCaptureDevice * device ...
分类:
移动开发 时间:
2016-06-15 19:07:41
阅读次数:
239
当使用xib加载控制器的时候,报如下错误: 原因: 控制器与xib没有关联 解决办法: 1.选择xib文件 2.控制器类关联 3.视图关联(拖线) ...
分类:
其他好文 时间:
2016-06-08 19:01:06
阅读次数:
470
加载xib2中方式 NSArray *array = [[NSBundle mainBundle] loadNibNamed:@"xib名称" owner:nil options:nil]; UINib *nib = [UINib nibWithNibName:@"xib名称" bundle:nil ...
分类:
其他好文 时间:
2016-06-06 23:39:56
阅读次数:
221