when has AutoLayout finished its work?
when has AutoLayout finished its work?
- Subject: when has AutoLayout finished its work?
- From: "Gerriet M. Denkmann" <email@hidden>
- Date: Wed, 26 Nov 2014 12:50:50 +0700
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@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