I've been trying to replicate the button on the iPhone dashboard, the Home screen. What I'm trying to achieve is the following :
- A simple button, with an image and all its UIButton properties.
- On top of it, a long press gesture recognizer. On the long press, the button shakes but you can still use it.
I've managed to do just all that but I'm facing the following issue, which Apple could beat, and I couldn't (yet) :
On a normal tap, the OS waits a little to make sure it's not a longpress, or a double tap, or anything I guess. It cannot know for sure it's not a special gesture until it has waited long enough. So every tap on that button is registered, but everything is delayed of about 1.5 seconds.
This is ridiculously bad user experience, but when I tap on an App in the homescreen, its' instantenous (even when the app is killed). Yet, if I longpress, it registers properly.
Mine does not. What am I overlooking here?
I have exactly this :
- two UIButtons slightly overlapping each other, imagine the app icon and the "delete app" button on the corner. (blue and purple)
- A UIView that exactly contains those two UIButtons. (green)
- A UILongPressGestureRecognizer on that UIView (not shown)
The long gesture code is only called once the gesture has reached it's "Began" state, just like the iOS behaviour on the home screen. So pretty early in the process.
I've tried fiddling around with different properties and setups, but I can't get it to work. Has any of you achieved this? What's the proper setup?