Re: Rotate a standard Cocoa control?
Re: Rotate a standard Cocoa control?
- Subject: Re: Rotate a standard Cocoa control?
- From: Graham Cox <email@hidden>
- Date: Tue, 12 May 2015 12:01:50 +1000
> On 11 May 2015, at 9:41 pm, Graham Cox <email@hidden> wrote:
>
>
>> On 11 May 2015, at 9:25 pm, Roland King <email@hidden> wrote:
>>
>>
>> I thought they added phase and momentumPhase to NSEvent, plus hasPreciseScrollingDeltas, scrollingDeltaX and scrollingDeltaY to help disambiguate between clicky scrollwheels and draggy trackpads, give finer results and let you know what constitutes one motion. The phase brackets the actual events with Began, Ended, Changed and a few others and the preciseScrollingDeltas are .. more precise. Then when it’s all done you get a momentumPhase for deceleration.
>
>
> Aha… I do see those. They were not the subject of the WWDC video I watched - maybe dangerwill was referring to a different one? These look potentially useful, I’ll check them out.
OK, I think I have a nice all-round solution. Thanks Roland, these were exactly what I needed. Using the scrollwheel or trackpad scroll gestures works nicely for all the input devices I was able to test with, and also corrects for the user’s “natural direction” preference so that the control is consistent. Let me know if it sucks for your mouse/trackpad though.
I also added a few other enhancements. I think that’s about as far as I want to go with this for now, I ought to get on with some real work :)
http://apptree.net/code/GCVolumeControl.zip
—Graham
_______________________________________________
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