开发者

Create a UIView from NIB

开发者 https://www.devze.com 2023-04-07 17:30 出处:网络
I have created a custom class that subclasses UIView. I want to do my layout in IB, so have set outlets. The problem is how do I initialise my开发者_JAVA技巧 view so that I get it from the NIB? Any he

I have created a custom class that subclasses UIView. I want to do my layout in IB, so have set outlets. The problem is how do I initialise my开发者_JAVA技巧 view so that I get it from the NIB? Any help would be greatly appreciated.


Something like this:

UIView *info = [[[NSBundle mainBundle] loadNibNamed:@"InfoWeather" owner:self options:nil] objectAtIndex:0];
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号