Add NSView from different nib
Posted
by Matt S.
on Stack Overflow
See other posts from Stack Overflow
or by Matt S.
Published on 2010-06-16T22:14:09Z
Indexed on
2010/06/17
10:03 UTC
Read the original article
Hit count: 335
How can I add a subview when the new view is in a different xib file?
The class for the different nib is an NSViewController and I'm using self = [super initWithNibName:@"NewView" bundle:nil];
to load the nib
Can I just do something like:
NewView *nv = [NewView new];
[oldView removeFromSuperView];
[mv addSubview:[nv theView]];
or do I have to do something different
© Stack Overflow or respective owner