[英]Why can't i see my whole tab bar when i add it in a view as subview?
I am new to iPhone development. 我是iPhone开发的新手。 I am working with an navigational based application and want to add a tab bar view in my application.
我正在使用基于导航的应用程序,并想在我的应用程序中添加标签栏视图。 For that i created a view called TabBarView and added a UITabBarController outlet.
为此,我创建了一个名为TabBarView的视图,并添加了一个UITabBarController插座。 viewDidLoad of my TabBarViewController.m is like this:
我的TabBarViewController.m的viewDidLoad是这样的:
- (void)viewDidLoad {
[self.view addSubview:tabBarController.view];
[super viewDidLoad];
}
When i watch it in simulator, i can't see my whole tab bar. 当我在模拟器中观看时,看不到我的整个标签栏。 I can just see half of it.
我只能看到一半。 I went through some tutorials and tried to set view size, but i couldn't.
我浏览了一些教程,尝试设置视图大小,但是我做不到。 Can anyone tell me why can't i see whole tab bar and how to fix it.
谁能告诉我为什么我看不到整个标签栏以及如何解决它。 Thanks in advance.
提前致谢。
make sure that the size of view is 480 cause you see half of it because you have status bar of 20 so your view is 460 please 确保视图的大小为480,因为状态栏为20,所以您只能看到一半,因此视图为460。
Your view without statusbar is 480 with it 460 so when you add tabbar with 40 pixel so you have to make the view of size 480... so not to hide the 20 of status bar 您不带状态栏的视图是480,带460,因此当您添加40像素的标签栏时,您必须使视图大小为480 ...以便不要隐藏状态栏的20
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.