Nikita Jerschow
Nikita Jerschow

Reputation: 866

How would you sense a held button?

How would I code something to sense if a certain button is being held down? and how would I add a timer into my application?

Regards, Nikita.

Upvotes: 0

Views: 57

Answers (1)

joshOfAllTrades
joshOfAllTrades

Reputation: 1982

It sounds like you're looking for UILongPressGestureRecognizer. With it you can configure a minimumPressDuration, which may fulfill your need for a timer, and if it does not then NSTimer is pretty easy to work with.

Upvotes: 3

Related Questions