UIBarButtonItem not clickable on iOS 11 beta 7?

后端 未结 5 907
南旧
南旧 2020-12-17 15:19

There is another question on SO about this but this has nothing to do with it because I think this has to do with a beta version of iOS 11.

I have these 2 UIBu

5条回答
  •  孤街浪徒
    2020-12-17 15:20

    I have discovered the problem! Amazing bug!

    This is the drill. I was adding two buttons to the left navigation item by doing this:

    1. create a view
    2. add two UIButtons inside that view.
    3. add that view to the left navigation item.

    This was compiled for iOS 9 and works on a device with iOS 10 and below but not iOS 11.

    The "correct" way of doing this is this

    1. Drag an UIButton to the left navigation item.
    2. Drag another UIButton to the left navigation item.

    You will see that iOS allows that to happen and will manage both buttons under "navigation items".

    this will work on all iOS versions I have tested from 9 thru 11.

提交回复
热议问题