[iPhone] How to sense the duration of touch on iPhone button.

2009-09-10 Thread Dan Ribe
Hi All,



I am trying to implement a phone pad for my application. For key with title
'0' I want the same behavior as the iPhone phone application :


1. If user touches, it should immediately display a 0.

2. If user holds down the button for some time, it should display a '+' (I
mean 0 should be replaced with a '+').



Can anyone help me with the second part of this? What kind of handling is
required for this. I mean how i can find out that user is holding that
button for sometime ?



Thanks for help !
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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

This email sent to arch...@mail-archive.com


Re: [iPhone] How to sense the duration of touch on iPhone button.

2009-09-10 Thread Roland King
start a timer when the button goes down and queue it. If it fires  
before the button goes up, you have your '+', if the finger goes up  
first, cancel the timer.


On 10-Sep-2009, at 8:35 PM, Dan Ribe wrote:


Hi All,



I am trying to implement a phone pad for my application. For key  
with title

'0' I want the same behavior as the iPhone phone application :


1. If user touches, it should immediately display a 0.

2. If user holds down the button for some time, it should display a  
'+' (I

mean 0 should be replaced with a '+').



Can anyone help me with the second part of this? What kind of  
handling is

required for this. I mean how i can find out that user is holding that
button for sometime ?



Thanks for help !
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/rols%40rols.org

This email sent to r...@rols.org


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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

This email sent to arch...@mail-archive.com