摘要: UIView存在nib时,不能使用alloc init,正确的方法如下:1 NSArray *nib = [[NSBundle mainBundle] loadNibNamed:@"CustomView" owner:self options:nil];2 UIView *tmpCustomView = [nib objectAtIndex:0];其中对应的nib文件应设置file owner。这样就可以使用nib中的UIView了。 阅读全文
posted @ 2013-01-12 16:05 归为虚无 阅读(2910) 评论(0) 推荐(1) 编辑