NSViewController view not showing in NScrollView
NSViewController view not showing in NScrollView
- Subject: NSViewController view not showing in NScrollView
- From: tridiak <email@hidden>
- Date: Mon, 17 Aug 2015 17:06:26 +1200
Hello.
I have a window controlled by a NSWindowController subclass with a standard nsscrollview. (Outlets are connected).
I load a custom view via a NSViewController subclass. (view outlet is connected).
The custom view is not visible.
@implementation AppDelegate
- (IBAction) newWindow:(id)sender {
mwc=[[MonWindowController alloc] initWithWindowNibName:@"MonsterWindow"];
subLayout=[[PRMLayout alloc] initWithNibName:@"StdLayout" bundle:nil];
subLayout.view; // force view to load. Necessary?
[mwc setPRMLayout:subLayout];
[mwc showWindow:self];
};
@end
@implementation MonWindowController
- (void) setPRMLayout:(PRMLayout*)layout {
[scrollView setDocumentView:layout.view];
};
@end
Before I added in a custom NSWindowController, the window belonged to the AppDelegate (standard app template with a single window connected to AppDelegate). The window had the standard NSScrollView.
When I added the custom view (NSViewController subclass and nib) to the scrollview, the custom view actually displayed.
Changing to custom NSWindowController broke this somehow.
What am I missing?
TIA
Mark
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden