0

I have a few simple UIBarButtonsItems(no customization other than changing style, color and alpha). Everything was working perfectly fine for some time. But now I need to press BarButton for a long time(4-5 seconds) before the action is triggered.

I just moved toolbar around and changed color and alpha after which this started happening. I don't exactly understand what caused this change of behavior.

I used interface builder to build the view and assigned action to UIBarButtonItems by Ctrl+Dragging.

I tried looking up a lot both on google and so. Most of the questions are about UIBarButtons not responding at all. Still I tried the solution of cleaning build of project and Xcode cache. But nothing changed.

Could someone help me with this?

zambrey
  • 1,452
  • 13
  • 21
  • Does same thing happen when you use the simulator & your mouse cursor to tap the button ? – Zhang May 24 '13 at 13:07
  • Yes it works the same and incorrect way both in simulator and on actual device. – zambrey May 24 '13 at 15:09
  • Even deleting the whole toolbar and creating everything in it from scratch doesn't help. The same behavior persists. The older nibs with UIToolbars in the project work fine. This is just happening to the couple of nibs I added later. I hope it's not an issue to have UIToolbar in a subview of a view with UIToolbar in it because it was working fine for some time. – zambrey May 24 '13 at 15:49

1 Answers1

0

I realized my mistake. I had two events getting triggered in same space in view. First was to reveal toolbar(i.e. increase its alpha) when tapped in particular area of the view and second one was of course button tap event for UIBarButtonItem. When tapped in that area the first event got triggered and eventually when pressed for long it also fired the second event once the toolbar was visible(if toolbar was invisible before).
Sorry to bother you all.

zambrey
  • 1,452
  • 13
  • 21