The question I have is if it is possible to create a control, similar to a UIButton, but can have the tap and the long press gesture linked together? The reason I ask is because I would like to mimic the functionality of the application in the home screen (tap to open application, hold to move it around or delete it). I would like to create a button, or use the UIButton if the functionality is possible, that can either perform a simple calculation when pressed, but if the button is held down then a view would popup where the user can change the result will be output.
Any advice is greatly appreciated in this matter.
If I understand you correct you need to add several gesture recognizers to UIButton?
Remembering that UIButton is inherited from UIView you can add many gestures to it using:
All gestures will be stored in:
So you can add UILongPressGestureRecognizer as well as other types of gestures.
But to able to make difference between single tap and long press tap – add standard target to UIButton with control event:
UIControlEventTouchUpInside