Re: Basic Q: Where is the best place to open a drawer?
Re: Basic Q: Where is the best place to open a drawer?
- Subject: Re: Basic Q: Where is the best place to open a drawer?
- From: Quincey Morris <email@hidden>
- Date: Mon, 19 Jul 2010 15:17:42 -0700
On Jul 19, 2010, at 14:50, Rick Mann wrote:
> -windowDidLoad is called when the nib loads, but really I'm interested in opening the drawer after window becomes visible.
You mean you want to see the animation of the drawer sliding out?
If you don't care (which I was assuming), then it would be fine to open the drawer in windowDidLoad:.
If you do care, then you can simply invoke [self showWindow: self], followed by the code to open the drawer, just before returning from your window controller's 'init' method.
(Actually, I'm not sure if you'll lose the start of the animation, or see the animation stutter, if you do it exactly like that. An alternative is do a '[self performSelector...afterDelay: 0]' of the drawer-opening code. Or even '...afterDelay:0.1'.)
_______________________________________________
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