Anybody experiencing no response for IBAction touchUpInside
in Xcode 4.5, deployment target iOS 5 as well? It works in simulator for me having iOS6, but not iOS5.
3 Answers
I had this same issue because I was using a tap gesture. You should be able to keep your existing code by adding the line below. This will keep your tap gesture from killing any taps on interior buttons and such...
yourTapGesture.cancelsTouchesInView = NO;

- 1,219
- 1
- 21
- 27
Edit:
I have found the solution. I was adding a tap gesture
to the view, which was overriding the view's ability to detect a touchUpInside
action on any buttons since they are part of the view as well. So what you should do is either remove the gesture recognizer or make it specific to a certain object. For example, I added the touch gesture to the specified part of the view that was not on the subview (I created a new object / outlet and labeled it as such). Still not sure why it's different in 5.1 vs. 6.0, but this should help you.
Original Post:
I am having the same issue. I have a project where buttons on a subview are clickable on version 6.0 of the simulator but not version 5.1. I have some gesture recognizers in there as well but commented them out to see if they were the issue and they are not. The only thing I have found is that the buttons are sometimes clickable on a touch up outside action (even though they are programmed for touch up inside), so I am not sure if maybe Apple changed the eNums for button actions? If I come up with a solution I will be sure to provide it here.

- 15,429
- 10
- 73
- 104

- 3,319
- 2
- 34
- 45
I just created a new demo project. I added a button to a view, handle touchUpInside, built and tested using Xcode4.5 on both deployment target ios6 and ios5 - both worked just fine. Try with a demo project yourself - won't take more than a few min.

- 40,852
- 12
- 92
- 138
-
Well if you do the same then it's not Xcode (on your system) nor is it the simulator. The only free variable is your code. Thus it must be something you are doing - you interposed a tap gesture recognizer for example. – David H Oct 07 '12 at 13:10
-
That is an interesting idea, I do have many tap gesture recognizers there. The challenge is - why on Earth it works on iOS 6 and not iOS 5, did gesture recognizers change in new SDK? – Michal Oct 07 '12 at 14:44
-
A whole boatload of internals changed in iOS6. Apple broke my app in the store. Look at your phone - the updated apps - how many say modified to work on iOS6? – David H Oct 08 '12 at 11:31