On Aug 30, 2015, at 5:57 PM, Seth Willits <sli...@araelium.com> wrote:

> 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?

Turn off Visible at Launch on the window in the NIB.  Have the controller which 
initiates the loading also tell it to show.  That is, some other controller is 
instantiating your window controller and invoking either -window or 
-showWindow: on it to cause the NIB to be loaded.  If it's not already 
-showWindow:, then either add that or have it call -window and then 
-makeKeyAndOrderFront: on the window.

Anyway, the point is that merely the loading of the NIB should not cause the 
window to be visible.  It should be made visible *after* the NIB has loaded, 
which means after -windowDidLoad has already done its thing.

Regards,
Ken


_______________________________________________

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