Re: disable beginSheet animation
Re: disable beginSheet animation
- Subject: Re: disable beginSheet animation
- From: Peng Gu <email@hidden>
- Date: Fri, 17 May 2013 07:55:41 +0800
It seems that once you changed the speed value, you can't restore it. Other
sheets including the open, save panels will use the new value.
So in the end, I decided not to do it.
> 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.
I wanted it to appear immediately because my popovers don't use animation.
Turns out showing sheets without animation looks awkward, and has the
non-restorable side effect.
On Fri, May 17, 2013 at 6:18 AM, Fritz Anderson <email@hidden>wrote:
> 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