Re: window flash
Re: window flash
- Subject: Re: window flash
- From: Alexander Cohen <email@hidden>
- Date: Tue, 18 Nov 2008 18:51:34 -0500
You are absolutely right. thank you.
AC
On Nov 18, 2008, at 6:33 PM, Michael Ash wrote:
On Tue, Nov 18, 2008 at 4:15 PM, Alexander Cohen <email@hidden
> wrote:
Hi,
I have a window controller that i'm creating dynamically in the
applicationDidFinishLaunching: app delegate notification. In this
window
controllers windowDidLoad:, i'm adding subviews to it's content
view. When i
create it then call showWindow: on it, the window shows up on
screen without
any subviews in then it seems to update with all the subviews in
it, this
causes a sort of visible flash. Has anyone seen this and does
anyone have
any idea why this might be happening?
Uncheck the "Visible at Launch" checkbox in IB. With that box checked,
the window gets displayed right when the nib loads, before your
windowDidLoad method (no colon, note, it does not take a parameter) is
invoked. You then add subviews to it after it's already visible,
leading to a flash. And then of course your window controller tells
the window to become visible, but this does nothing because it already
is.
If you uncheck that box, the window will be invisible when first
loaded from the nib. This will allow you to do whatever setup you need
and then the showWindow: method will make it visible "manually"
afterwards.
Mike
_______________________________________________
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
_______________________________________________
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