user772489
user772489

Reputation: 59

UIButton event "touch hold"

in Xcode 3.2 Interface Builder there was a UIButton Send Event called "touch hold". This very simply executed the event as long as the button was being held. For example lets say you had a red light and UIButton that lit up the light. The "touch hold" send event would keep the light lit the while the button was being pushed but when the user took his finger off the button, the light would turn off. Does anyone know what happened to this event and how to implement it in xcode 4.0 preferably in Interface Builder like xcode 3.2.

Upvotes: 1

Views: 3632

Answers (2)

Parthpatel1105
Parthpatel1105

Reputation: 541

In iPad iOS 7 touch down method does not work properly.

Multitasking is enabled from setting.(4 finger multitasking).

Upvotes: 2

Daniel G. Wilson
Daniel G. Wilson

Reputation: 15065

Making your own seems to be the easiest route. Create two IBActions, one that turns your red light off, and one that turns your red light on.

In interface builder, connect the button's "touch Down" send event to the IBAction turning on your light. Then connect the button's "touch Up Inside" send event to the IBAction turning off your light.

Upvotes: 7

Related Questions