- (void)viewDidLoad {
[super viewDidLoad];
NSArray *bundle = [[NSBundle mainBundle] loadNibNamed:@"Blah" owner:self options:nil];
Blah *blah;
for (id object in bundle) {
if ([object isKindOfClass:[Blah class]])
blah = (Blah *)object;
}
[self.view addSubview: blah];
}
This assumes a Xib named 'Blah' with its view set to a UIView subclass named 'Blah' (which also exists).
1 comment:
Thanks, this really helped me out. Let me know if you want some promo codes for my apps. I'm in the store under the company name eliolhan.
Post a Comment