加载Nib的2种方法
2015-08-04 10:18 一树一菩提 阅读(363) 评论(0) 编辑 收藏 举报方法1:
NSArray *objects = [[NSBundle mainBundle] loadNibNamed:@"flowerCell" owner:self options:nil];
cell = objects[0];
方法2:
UINib *nib = [UINib nibWithNibName:@"flowerCell" bundle:nil];
NSArray *objects = [nib instantiateWithOwner:nil options:nil];
cell = objects[0];