开发者

UINavigationBar height

开发者 https://www.devze.com 2022-12-31 01:09 出处:网络
In my app I work with an UINavigationController. I\'ve added it to the window (MainWindow.xib, with IB) and simulated on my main view (in IB: Simulated User Elements / Top Bar / Navigation Bar).

In my app I work with an UINavigationController. I've added it to the window (MainWindow.xib, with IB) and simulated on my main view (in IB: Simulated User Elements / Top Bar / Navigation Bar).

Navigation开发者_如何学JAVA bar is displayed, but its height isn't standard. At least in IB it is bigger than in launched app.

What's wrong? And how can I restore height to the initial state (as in IB)?

P.S.: I know that I can set it directly from code. But this way looks like a "crutch".


It is a default behavior of UINavigationBar. In the landscape mode it is displayed thin (it's height is smaller than in the portrait mode). But the Interface Builder has a bug - it doesn't shrink UINavigationBar according to interface orientation during simulation.

0

精彩评论

暂无评论...
验证码 换一张
取 消