What is NSAnimationSlowMotionOnShift?
What is NSAnimationSlowMotionOnShift?
- Subject: What is NSAnimationSlowMotionOnShift?
- From: Bill Cheeseman <email@hidden>
- Date: Thu, 25 Sep 2014 16:06:10 -0400
Here's my code to animate in slow motion only when the Shift key alone is down, and not to animate when other modifier keys are down along with the Shift key. This should reduce the likelihood of conflicts with keyboard shortcuts that include the Shift key along with other modifier keys. Don't forget to reset the duration after the animation completes if you reuse the animation.
if (([NSEvent modifierFlags] & NSDeviceIndependentModifierFlagsMask) == NSShiftKeyMask) {
[viewAnimation setDuration:5.0]; // the Shift key by itself is down
}
--
Bill Cheeseman - 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