• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
when has AutoLayout finished its work?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: when has AutoLayout finished its work?
      • From: Ken Thomases <email@hidden>
  • Prev by Date: Re: Altering the size of UISlider's “slider ball”
  • Next by Date: Re: Altering the size of UISlider's “slider ball”
  • Previous by thread: Re: Altering the size of UISlider's “slider ball”
  • Next by thread: Re: when has AutoLayout finished its work?
  • Index(es):
    • Date
    • Thread