All posts tagged: ios

Why is my button triggering the wrong gesture?

iOS

I had a fun little problem in my work-in-progress iOS app recently. The app recognises a pan gesture on the main view, but also has some buttons as subviews of the main view. Think a white rectangle that receives pan gestures, and a UIButton in the middle of that view. Everything worked fine in the simulator. Panning worked. Tapping the button worked. Not so on a real device.