The problem is this: title bar for some reason is not displayed in the center on some controllers.
http://i053.radikal.ru/1703/fb/ddc916172974.png
The first thought was that it was because of a long title. Not.
Firstly, this controller can be reached in two ways, and if you go to it by the second way, then the title is displayed normally.
Secondly, this screenshot is made on iphone SE. On the iphone 7+, for example, this controller looks fine, but here's another controller that looks normal on the SE, 7+ again is buggy:
http://s020.radikal.ru/i709/1703/ab/6dd3dbcf56a7.png
As you can see, there is already a short name.
Above said that the first controller shown can be reached in two ways. I thought that something could be here, but both methods are absolutely identical, that is, the same push-transition is both there and there.
I tried to put the title of the title through the navigationItem in the Storyboard, and in the code:
override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) navigationItem.title = "Акции" } Also, I tried to create a custom title in this place, that is, to create a UIView, to push the text onto it and assign it to navigationBar.titleView. As a result, a custom view is also crookedly displayed.
On real devices I also tried to run - the same thing.
I can not imagine what could be wrong. Surely this is some kind of eplovsky bug, but how do I get around it?