Document based Cocoa app; Window has CustomView inside ScrollView; uses
autolayout. 10.10.1
Problem: the autolayout stuff keeps butting in and setting the frameSize of my
CustomView to (0,0).
So I need some method like: autolayoutHasFinishedItsWork, but cannot find such.
windowDidLoad of DaysWindowController (subclass of NSWindowController) is
called before the autolayout has done it's work.
windowControllerDidLoadNib (NSDocument method) is never called.
My subclass of NSDocument has:
- (instancetype)init
{
self = [super init];
if (self == nil ) return nil;
// created early because needed in readFromData:ofType:error:
self.daysWindowController = [ [ DaysWindowController alloc]
initWithWindowNibName: @"DaysWindowController" ];
return self;
}
- (BOOL)readFromData:(NSData *)data ofType:(NSString *)typeName error:(NSError
**)outError
{
BOOL ok = [ self.daysWindowController loadFromData: data error:
outError ];
return ok;
}
- (void)makeWindowControllers
{
[ self addWindowController: self.daysWindowController ];
}
- (void)windowControllerDidLoadNib:(NSWindowController *)aController
{
[super windowControllerDidLoadNib:aController];
// Add any code here that needs to be executed once the
windowController has loaded the document's window.
NSLog(@"%s %@",__FUNCTION__, aController ); ← never seen
}
Gerriet.
_______________________________________________
Cocoa-dev mailing list ([email protected])
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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [email protected]