Issue with button on the left side of the uinavigation bar

后端 未结 3 618
野的像风
野的像风 2021-01-03 11:32

I have a button on the left side of the navigation bar. I also have a UIButton near that button.

Now when I click the button thats below the navigation bar, in many

3条回答
  •  有刺的猬
    2021-01-03 12:01

    UINavigationButtons have a much larger tappable area than it's view, Apple made it this way for ease of use. If you really want to have two buttons that close to each other you have to subclass UINavigationBar, more specifically, override the touch events, get the touch coordinates and act as you see fit. More info here.

提交回复
热议问题