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 t开发者_开发问答hat 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.
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.
In iPad iOS 7 touch down method does not work properly.
Multitasking is enabled from setting.(4 finger multitasking).
精彩评论