My window's UI mainly consists of a stack view, but in the window's xib, 
there's nothing in the stack view to begin with. This means that after the xib 
loads, the window is tiny (like 70 x40).

In windowDidLoad I'm adding views to the stackview which actually make it the 
"real" size it should be, once autolayout happens. The problem is that the 
window is already shown and visible on screen before the new layout even takes 
effect, which is requiring me to wrap xib loading in 
NSDisableScreenUpdates/NSEnableScreenUpdates.

Is there something else I could/should be doing? (Besides obviously having the 
window loaded from the xib be the correct size to begin with, which simply 
isn't possible.)



- (void)windowWillLoad;
{
        NSDisableScreenUpdates();
        [super windowWillLoad];
}


- (void)windowDidLoad
{
        [super windowDidLoad];
        
        < at this point, the window is already visible >
    
        ... 
        [stackView addView:view inGravity:NSStackViewGravityTop];
        ...
        
        [self.window layoutIfNeeded];
        [self.window center];
        NSEnableScreenUpdates();
}



--
Seth Willits




_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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 arch...@mail-archive.com

Reply via email to