0

Why is there a pregnant pause between custom back button touch up and an action delivered?

back button was setup using abbood recipe here

How can I have a UIBarButtonItem with both image and text?

but it's not specific to this method of back button setup. I remember it was always slow.

Anton Tropashko
  • 5,486
  • 5
  • 41
  • 66

1 Answers1

0

The problem is probably that when you put a custom button inside a UIBarButtonItem you have a button within a button. So the runtime has to figure out what exactly the tap belongs to and what kind of tap it is.

matt
  • 515,959
  • 87
  • 875
  • 1,141
  • Seems like a common pattern here https://stackoverflow.com/questions/3903018/how-can-i-have-a-uibarbuttonitem-with-both-image-and-text – Anton Tropashko Jul 31 '19 at 07:13
  • stuffing a custom non button uiview with isuserinteractionenabled set to false into UIBarButtonItem constructor taking a custom view brings another problem: target action on UIBarButtonItem itself is not invoked – Anton Tropashko Jul 31 '19 at 07:14