NSArray *screens=[[NSBundle mainBundle] loadNibNamed:@"mynib" owner:self options:nil];
[self addSubview:[screens objectAtIndex:0]];
[self addSubview:[screens objectAtIndex:0]];
You should add these lines in init method of your UIView implementation (.m) file.
There is a Complete Tutorial of how to Create UIView with nib file in XCode 4 HERE.
No comments:
Post a Comment