开发者

UITabBar appears 20 pixels down?

开发者 https://www.devze.com 2023-02-26 02:30 出处:网络
I have created a UITabBarController and adding to a UIViewController subview. My code is implemented programmatically.

I have created a UITabBarController and adding to a UIViewController subview.

My code is implemented programmatically. The UITabBar is showed up 20pixels down the view.

UITabBarController *tabCtrl_obj = [[UITabBarController alloc]init];
[self.view addSu开发者_如何学JAVAbview:tabCtrl_obj.view];

How should i solve it?


It's the status bar that's doing it. Sometimes if you add a view directly to the window it can behave oddly - generally it means you have to define more elements of the view yourself. Try reducing the size of your view by 20 pixels (probably to 460) and then removing the simulated status bar in interface builder. How much are you doing programmatically?

0

精彩评论

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

关注公众号