• 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: NSStepper - useless?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSStepper - useless?


  • Subject: Re: NSStepper - useless?
  • From: Graham Cox <email@hidden>
  • Date: Thu, 23 Feb 2012 09:26:59 +1100

On 20/02/2012, at 11:11 AM, William Squires wrote:

> Okay, 'nuther dumb question. How do I hook the different arrows in an NSStepper to actions in my view controller? Or how do I ask (id)sender which arrow was clicked?


You can't, it works differently. Instead it has a "value" , just like a slider. This can be incremented or decremented, and the action method can extract the value and respond accordingly. In other words it tracks the value for you, you don't use it to increment or decrement a value in your data model.

It's actually quite nice that it works this way, because you can hook it up with a textfield to the same action method, and set the two together, or bind them in pairs if you're using bindings. The max, min and increment amount can all be set in IB.

--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


References: 
 >NSStepper - useless? (From: William Squires <email@hidden>)

  • Prev by Date: Can't create window context…crash
  • Next by Date: Re: binding a binding?
  • Previous by thread: Re: NSStepper - useless?
  • Next by thread: Re: NSStepper - useless?
  • Index(es):
    • Date
    • Thread