Pardon me if I'm only using iOS terms.  

OK.  First off, your UIButton needs to respond to UIControlEventTouchUpInside 
and also needs to respond to UIControlEventTouchDownRepeat.

Check out the UIControl Class Reference for the nature of the Touch Events you 
can respond to.

You'll need a timer to and counter if you want to generate a faster FFWD if the 
button is held down longer.

I had to do this while prototyping the FiOS TV GUI for Verizon a few years 
back.  FFWD and RWD had modes that were the rate of the action.  You'd go from 
1x to 2x, 3x and 4x and then back to 1 again if you:

Held the ffwd button down, released and pressed again within 350 ms.  

Holding down the button only started the FFWD/RWD mode and kept it active or 
advanced to the next FFWD/RWD level if pressed again within 350ms.

Releasing the button did nothing to the rate.  Pressing play was required to 
stop the action, back up 2.5 seconds and continue from that point.  


Make sure to think this through and work on a few models to make sure it's a 
clean functionality design.


On Mar 16, 2012, at 2:53 AM, Peter Zegelin wrote:

> I need to implement something akin to the iTunes Fast Forward or Rewind 
> buttons, where a quick mouse click has a different action to when the button 
> is pressed for a longer time. I also need to link this action to a short or 
> long press of an arrow key on the keyboard. Before I have a go myself does 
> anyone know of an example out there?
> 
> I am fairly sure I can implement the mouse click part myself but am not 
> really sure how to go about adding keyboard support. Any ideas?
> 
> 
> thanks!
> 
> Peter
> _______________________________________________
> 
> Cocoa-dev mailing list ([email protected])
> 
> 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:
> https://lists.apple.com/mailman/options/cocoa-dev/zav%40mac.com
> 
> This email sent to [email protected]

- Alex Zavatone



_______________________________________________

Cocoa-dev mailing list ([email protected])

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to