I have a UIButton
in a navigation bar that sits over the top of a UIImage
and a UILabel
. It worked fine in iOS 10, but now in iOS 11 i
Adding to Clifton Labrum, this is the way to go. Apple changed the way navigation bars work in iOS 11. This can also be done in Storyboard but through descendant constraints.
The Custom view inside UIBarButtonItem can NOT be given constraints directly. Instead, provide its subviews with constraints, and the Custom view will get its constraints implicitly:
The custom view will implicitly get its size because of those constraints.
This should fix all the weird behavior caused by iOS 11.