标签:
.xib文件在经过编译器编译之后会变成.nib文件
NSArray *array=[[NSBundle mainBundle]loadNibNamed:@"ShopView" owner:nil options:nil];
[self.view addSubview:[array firstObject]];
UINib *nib=[UINib nibWithNibName:@"ShopView" bundle:[NSBundle mainBundle]];
NSArray *arr=[nib instantiateWithOwner:nil options:nil];
[self.view addSubview:[arr firstObject]];
标签:
原文地址:http://www.cnblogs.com/JavaTWW/p/5277712.html