iphone - UIButton event 'Touch Up Inside' not working. 'Touch Down' works fine -


i've got uibutton in uiview, in uiviewcontroller i've allocated , inited .xib file.

when hooking ibaction 'touch down' event of uibutton triggers correctly. if hook 'touch inside' event doesn't respond.

other events don't work either. 'touch drag enter', 'touch drag exit', 'touch outside' etc. touch down.

does have idea why might be?

rich

first, can absolutely, positively guarantee uibuttons correctly connected in ib responds expected touch-up-inside events. (can imagine if didn't?!)

given that, it's fair bet have not hooked things expect. here things try:

  • make action print log statement first thing:

    nslog(@"%s", __pretty_function__);

  • check in ib function button wired touch-up-inside action. (later, can wire multiple events but, testing, want simplify as possible.)

  • make sure button 50x50 or bigger. (small buttons hard press.)
  • for now, make button rounded-rect button. if had image button, , image has transparency, may hard press.
  • make sure have correct signature action:

    - (ibaction) mybuttonpressedaction: (id) sender;

  • just sure everything's clean, delete button .xib , re-add it.

  • make sure parent view has userinteractionenabled set.
  • make sure xib's fileowner view-controller type.

if none of helps, you'll have tell more problem area. perhaps add screenshot of button setup in ib , code snippets project.


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -