• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Rotate a standard Cocoa control?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Rotate a standard Cocoa control?


  • Subject: Re: Rotate a standard Cocoa control?
  • From: Robert Martin <email@hidden>
  • Date: Fri, 08 May 2015 16:08:57 -0400

Graham,

Thanks so much for posting this. I’ve always wondered how to go about doing this kind of thing, but never had the actual need in a project to prod me to figure it out. Your app and code are terrific at making things clear.

Thanks,

Rob


> On May 7, 2015, at 11:54 PM, Graham Cox <email@hidden> wrote:
>
>
>> On 8 May 2015, at 6:11 am, Jerry Krinock <email@hidden> wrote:
>>
>> I would like to subclass NSSlider to make it work like the "volume control" on a mid 19th-century radio receiver. That is, I want the minimum value to be at 7 o'clock, and the maximum value to be at 5 o'clock.
>
>
> Jerry,
>
> Since I found the problem interesting and also potentially useful for something of my own down the track, I thought I’d have a quick go at making a control like this.
>
> It’s here: http://apptree.net/code/GCVolumeControl.zip
>
>
> It’s fairly basic, though it does what you want with the positioning and stopping on tick marks, etc. I subclassed NSControl rather than NSSlider but I kept some of the same method names so it’s easy to swap in. The knob itself is just a PDF resource which I created using my own Artboard app (graphic and original file included). Obviously you can change this to anything you like - my quick and dirty image is likely a bit short of your needs.
>
> Hopefully you find it useful, and at least having the source you can customise it easily compared to standard classes. No licensing issues from me either.
>
> —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


_______________________________________________

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


  • Follow-Ups:
    • Re: Rotate a standard Cocoa control?
      • From: Jerry Krinock <email@hidden>
    • Re: Rotate a standard Cocoa control?
      • From: Jerry Krinock <email@hidden>
    • Re: Rotate a standard Cocoa control?
      • From: Graham Cox <email@hidden>
References: 
 >Rotate a standard Cocoa control? (From: Jerry Krinock <email@hidden>)
 >Re: Rotate a standard Cocoa control? (From: Graham Cox <email@hidden>)

  • Prev by Date: Limiting GCD concurrent queues
  • Next by Date: Re: Limiting GCD concurrent queues
  • Previous by thread: Re: Rotate a standard Cocoa control?
  • Next by thread: Re: Rotate a standard Cocoa control?
  • Index(es):
    • Date
    • Thread