Re: disable beginSheet animation
Re: disable beginSheet animation
- Subject: Re: disable beginSheet animation
- From: Fritz Anderson <email@hidden>
- Date: Thu, 16 May 2013 17:18:51 -0500
The documentation says that the default resize period is subject to change between OS releases, and it's possible others will have changed it on their own. (I've run into people who are at war with animations, and would be furious if their settings were undone.) You should collect the value before changing it, so you can restore it exactly afterwards.
A question: Why do you want a sheet to pop into view instead of acting as users expect? I am willing to trust you have a good reason, but I'm curious.
— F
On 16 May 2013, at 5:03 PM, Peng Gu <email@hidden> wrote:
> Found the answer.
>
> By setting the animation speed to a low value (not 0, otherwise 0.2 is used
> by default)
>
> [[NSUserDefaults standardUserDefaults] setFloat:0.00001 forKey:
> @"NSWindowResizeTime"];
>
> [NSApp beginSheet:....]
>
> [[NSUserDefaults standardUserDefaults] setFloat:0.2 forKey:
> @"NSWindowResizeTime"];
>
--
Fritz Anderson
Xcode 4 Unleashed: 4.5 supplement for free!
http://www.informit.com/store/xcode-4-unleashed-9780672333279
_______________________________________________
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