Re: Window cascading
Re: Window cascading
- Subject: Re: Window cascading
- From: Peter Ammon <email@hidden>
- Date: Tue, 08 May 2012 20:08:49 -0700
On May 8, 2012, at 2:01 AM, ecir hana <email@hidden> wrote:
> Why's that? Do I have to remember the returned NSPoint and pass it to
> next cascadeTopLeftFromPoint:?
Yes; the usual pattern is:
static NSPoint cascadeLoc = {0, 0};
cascadeLoc = [window cascadeTopLeftFromPoint:cascadeLoc];
The first time this is called (with 0, 0) the window won't be moved, so the window's initial position in the nib should be something reasonable (or call -center on it before cascade).
Hope that helps,
-Peter
_______________________________________________
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