ios - How can I check if a UIButton is being held down? -


Is there a way that a button with a xcode and swift one finger is coming? I am using SprintKit and I want to know whether a button is being touched in the update method.

You can create a UILongPressGestureRecognizer , for some time (1 second ), And set a flag to which a button is being touched. On release (to be a representative method), toggle the flag.


Comments

Popular posts from this blog

php - Select box validation (in laravel) -

pandas - Iterate on Groupby Object's fields -

Creating a sparse matrix in Matlab with a specified number of independent Bernoulli +-1 nonzero entries -