In my iOS 9+ app I use UINavigationBar
in some of the UIViewController
s "manually" (= placing them directly in the VC instead of using UINavigationViewController
).
Setting a height for such a UINavigationBar
using a simple contraint was no problem before. However in iOS 11 the bar itself still correctly uses the assigned size, but the content is not positioned correctly any more (is now alligned to the top).
Any idea how to solve this?
EDIT:
I am pretty sure, that this is not a duplicate of "customizing iOS 11 navigation bar height customizing", this this question addresses a problem with UINavigationBar
subclasses while I directly use UINavigationBar
. Additionally the described problem seems to solved since Beta 4, while I am experiencing the problem in Beta 6.
EDIT 2:
Meanwhile I implemented a UINavigationBar
subclass as proposed by CharlieSu in the other thread. However this did not solve the problem in my case. It seems that the subview frame are all set properly (without doing this manually), but the layout is broken anyway. So setting the frames manually does not make any difference.
UINavigationBar
uses some kind of gradient background. Do you see the issue on the side of iOS 10 or below? I would say, that iOS 10- work as expected and that the iOS 11 layout is broken. – Andrei Herford