storyboard设计两级TabBarController,第二级Tabbar的位置问题 storyboardtabbarcontroller 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 把那个view向下移动tababr的高度。。 如果你不是自己写的tabbar,,那个黑色有可能是系统的tabbar表示占位的,有个属性,你把它取消掉 我在viewDidLoad 里面设置 view的frame,没有任何效果,然后我在view的重载函数setFrame里打印发现,它在我设置之后还会被系统调用很多次,就是说,我的设置在前,系统设置在后,又把view的位置设置回去了,我到底要在哪里设置它的位置比较好啊 请问这个占位属性是在代码里设置吗,还是在storyboard里啊,谢谢 请问这个占位属性是在代码里设置吗,还是在storyboard里啊,谢谢storyboard 我在viewDidLoad 里面设置 view的frame,没有任何效果,然后我在view的重载函数setFrame里打印发现,它在我设置之后还会被系统调用很多次,就是说,我的设置在前,系统设置在后,又把view的位置设置回去了,我到底要在哪里设置它的位置比较好啊你最后一个pic显示你那view上有2个tabbar的占位 这种情况,最好不要全部都用tabbar,你考研用一个tabbat+分段按钮 请问这个占位属性是在代码里设置吗,还是在storyboard里啊,谢谢storyboard实在不知道怎么去设置这个占位 我在viewDidLoad 里面设置 view的frame,没有任何效果,然后我在view的重载函数setFrame里打印发现,它在我设置之后还会被系统调用很多次,就是说,我的设置在前,系统设置在后,又把view的位置设置回去了,我到底要在哪里设置它的位置比较好啊你最后一个pic显示你那view上有2个tabbar的占位 这种情况,最好不要全部都用tabbar,你考研用一个tabbat+分段按钮这个方法好像也可以,但是上下两个tabbar的场合应该也有把 我在viewDidLoad 里面设置 view的frame,没有任何效果,然后我在view的重载函数setFrame里打印发现,它在我设置之后还会被系统调用很多次,就是说,我的设置在前,系统设置在后,又把view的位置设置回去了,我到底要在哪里设置它的位置比较好啊你最后一个pic显示你那view上有2个tabbar的占位 这种情况,最好不要全部都用tabbar,你考研用一个tabbat+分段按钮这个方法好像也可以,但是上下两个tabbar的场合应该也有把也许你看别人的看起来象tabbar的,其实就是几个美化的button实现同级切换非要做成上下tabbar的也行。。我帮你在网上找找有没有。。 我在viewDidLoad 里面设置 view的frame,没有任何效果,然后我在view的重载函数setFrame里打印发现,它在我设置之后还会被系统调用很多次,就是说,我的设置在前,系统设置在后,又把view的位置设置回去了,我到底要在哪里设置它的位置比较好啊你最后一个pic显示你那view上有2个tabbar的占位 这种情况,最好不要全部都用tabbar,你考研用一个tabbat+分段按钮这个方法好像也可以,但是上下两个tabbar的场合应该也有把http://www.gowhich.com/blog/172 这个是隐藏tabbaar的。tabbar在顶部,就需要设置view。frame contentView.frame = CGRectMake(contentView.bounds.origin.x, contentView.bounds.origin.y, contentView.bounds.size.width, contentView.bounds.size.height + self.tabBarController.tabBar.frame.size.height); 我在viewDidLoad 里面设置 view的frame,没有任何效果,然后我在view的重载函数setFrame里打印发现,它在我设置之后还会被系统调用很多次,就是说,我的设置在前,系统设置在后,又把view的位置设置回去了,我到底要在哪里设置它的位置比较好啊你最后一个pic显示你那view上有2个tabbar的占位 这种情况,最好不要全部都用tabbar,你考研用一个tabbat+分段按钮这个方法好像也可以,但是上下两个tabbar的场合应该也有把http://code4app.com/ios/Sliding-Tabs/4f72eab96803fa8a50000000 看看这个怎么设置tabbar在顶部的 我在viewDidLoad 里面设置 view的frame,没有任何效果,然后我在view的重载函数setFrame里打印发现,它在我设置之后还会被系统调用很多次,就是说,我的设置在前,系统设置在后,又把view的位置设置回去了,我到底要在哪里设置它的位置比较好啊你最后一个pic显示你那view上有2个tabbar的占位 这种情况,最好不要全部都用tabbar,你考研用一个tabbat+分段按钮这个方法好像也可以,但是上下两个tabbar的场合应该也有把http://www.gowhich.com/blog/172 这个是隐藏tabbaar的。tabbar在顶部,就需要设置view。frame contentView.frame = CGRectMake(contentView.bounds.origin.x, contentView.bounds.origin.y, contentView.bounds.size.width, contentView.bounds.size.height + self.tabBarController.tabBar.frame.size.height); 这个真的可以了,已经达到我想要的效果了,谢谢谢谢我的storyboard里的关系是TabBarController1----TabBarController2-----ViewControler21 -----ViewController22 ------ViewController11我是想设置TabBarController2的TabBar到顶部,然后把其中的View扩展的下部我在ViewControler21 里 设置self.view的frame没有效果但是在ViewControler21 里 按照如下设置就又效果了UIView *contentView; if ( [[self.tabBarController.view.subviews objectAtIndex:0] isKindOfClass:[UITabBar class]] ) contentView = [self.tabBarController.view.subviews objectAtIndex:1]; else contentView = [self.tabBarController.view.subviews objectAtIndex:0]; contentView.frame = CGRectMake(contentView.bounds.origin.x, contentView.bounds.origin.y, contentView.bounds.size.width, contentView.bounds.size.height + self.tabBarController.tabBar.frame.size.height);我有点晕了,这里的view的层级好像很复杂啊,请问有没有清晰一点的层级结构图啊 请问这个占位属性是在代码里设置吗,还是在storyboard里啊,谢谢storyboard实在不知道怎么去设置这个占位 我发现直接在TabBarController2里调用如下代码UIView *contentView; if ( [[self.tabBarController.view.subviews objectAtIndex:0] isKindOfClass:[UITabBar class]] ) contentView = [self.tabBarController.view.subviews objectAtIndex:1]; else contentView = [self.tabBarController.view.subviews objectAtIndex:0]; contentView.frame = CGRectMake(contentView.bounds.origin.x, contentView.bounds.origin.y, contentView.bounds.size.width, contentView.bounds.size.height + self.tabBarController.tabBar.frame.size.height);或者 如下代码UIView *contentView; if ( [[self.view.subviews objectAtIndex:0] isKindOfClass:[UITabBar class]] ) contentView = [self.view.subviews objectAtIndex:1]; else contentView = [self.view.subviews objectAtIndex:0]; contentView.frame = CGRectMake(contentView.bounds.origin.x, contentView.bounds.origin.y, contentView.bounds.size.width, contentView.bounds.size.height + self.tabBarController.tabBar.frame.size.height);都可以达到我想要的效果 我在viewDidLoad 里面设置 view的frame,没有任何效果,然后我在view的重载函数setFrame里打印发现,它在我设置之后还会被系统调用很多次,就是说,我的设置在前,系统设置在后,又把view的位置设置回去了,我到底要在哪里设置它的位置比较好啊你最后一个pic显示你那view上有2个tabbar的占位 这种情况,最好不要全部都用tabbar,你考研用一个tabbat+分段按钮这个方法好像也可以,但是上下两个tabbar的场合应该也有把http://www.gowhich.com/blog/172 这个是隐藏tabbaar的。tabbar在顶部,就需要设置view。frame contentView.frame = CGRectMake(contentView.bounds.origin.x, contentView.bounds.origin.y, contentView.bounds.size.width, contentView.bounds.size.height + self.tabBarController.tabBar.frame.size.height); 这个真的可以了,已经达到我想要的效果了,谢谢谢谢我的storyboard里的关系是TabBarController1----TabBarController2-----ViewControler21 -----ViewController22 ------ViewController11我是想设置TabBarController2的TabBar到顶部,然后把其中的View扩展的下部我在ViewControler21 里 设置self.view的frame没有效果但是在ViewControler21 里 按照如下设置就又效果了UIView *contentView; if ( [[self.tabBarController.view.subviews objectAtIndex:0] isKindOfClass:[UITabBar class]] ) contentView = [self.tabBarController.view.subviews objectAtIndex:1]; else contentView = [self.tabBarController.view.subviews objectAtIndex:0]; contentView.frame = CGRectMake(contentView.bounds.origin.x, contentView.bounds.origin.y, contentView.bounds.size.width, contentView.bounds.size.height + self.tabBarController.tabBar.frame.size.height);我有点晕了,这里的view的层级好像很复杂啊,请问有没有清晰一点的层级结构图啊你自己写的代码你还不清楚你上面的层次图????建议看看关于图层和uiview的继承,uikit框架 我在viewDidLoad 里面设置 view的frame,没有任何效果,然后我在view的重载函数setFrame里打印发现,它在我设置之后还会被系统调用很多次,就是说,我的设置在前,系统设置在后,又把view的位置设置回去了,我到底要在哪里设置它的位置比较好啊你最后一个pic显示你那view上有2个tabbar的占位 这种情况,最好不要全部都用tabbar,你考研用一个tabbat+分段按钮这个方法好像也可以,但是上下两个tabbar的场合应该也有把http://www.gowhich.com/blog/172 这个是隐藏tabbaar的。tabbar在顶部,就需要设置view。frame contentView.frame = CGRectMake(contentView.bounds.origin.x, contentView.bounds.origin.y, contentView.bounds.size.width, contentView.bounds.size.height + self.tabBarController.tabBar.frame.size.height); 这个真的可以了,已经达到我想要的效果了,谢谢谢谢我的storyboard里的关系是TabBarController1----TabBarController2-----ViewControler21 -----ViewController22 ------ViewController11我是想设置TabBarController2的TabBar到顶部,然后把其中的View扩展的下部我在ViewControler21 里 设置self.view的frame没有效果但是在ViewControler21 里 按照如下设置就又效果了UIView *contentView; if ( [[self.tabBarController.view.subviews objectAtIndex:0] isKindOfClass:[UITabBar class]] ) contentView = [self.tabBarController.view.subviews objectAtIndex:1]; else contentView = [self.tabBarController.view.subviews objectAtIndex:0]; contentView.frame = CGRectMake(contentView.bounds.origin.x, contentView.bounds.origin.y, contentView.bounds.size.width, contentView.bounds.size.height + self.tabBarController.tabBar.frame.size.height);我有点晕了,这里的view的层级好像很复杂啊,请问有没有清晰一点的层级结构图啊你自己写的代码你还不清楚你上面的层次图????建议看看关于图层和uiview的继承,uikit框架mac和xcode刚刚使用5天,很多都很晕的 我在viewDidLoad 里面设置 view的frame,没有任何效果,然后我在view的重载函数setFrame里打印发现,它在我设置之后还会被系统调用很多次,就是说,我的设置在前,系统设置在后,又把view的位置设置回去了,我到底要在哪里设置它的位置比较好啊你最后一个pic显示你那view上有2个tabbar的占位 这种情况,最好不要全部都用tabbar,你考研用一个tabbat+分段按钮这个方法好像也可以,但是上下两个tabbar的场合应该也有把http://www.gowhich.com/blog/172 这个是隐藏tabbaar的。tabbar在顶部,就需要设置view。frame contentView.frame = CGRectMake(contentView.bounds.origin.x, contentView.bounds.origin.y, contentView.bounds.size.width, contentView.bounds.size.height + self.tabBarController.tabBar.frame.size.height); 这个真的可以了,已经达到我想要的效果了,谢谢谢谢我的storyboard里的关系是TabBarController1----TabBarController2-----ViewControler21 -----ViewController22 ------ViewController11我是想设置TabBarController2的TabBar到顶部,然后把其中的View扩展的下部我在ViewControler21 里 设置self.view的frame没有效果但是在ViewControler21 里 按照如下设置就又效果了UIView *contentView; if ( [[self.tabBarController.view.subviews objectAtIndex:0] isKindOfClass:[UITabBar class]] ) contentView = [self.tabBarController.view.subviews objectAtIndex:1]; else contentView = [self.tabBarController.view.subviews objectAtIndex:0]; contentView.frame = CGRectMake(contentView.bounds.origin.x, contentView.bounds.origin.y, contentView.bounds.size.width, contentView.bounds.size.height + self.tabBarController.tabBar.frame.size.height);我有点晕了,这里的view的层级好像很复杂啊,请问有没有清晰一点的层级结构图啊你自己写的代码你还不清楚你上面的层次图????建议看看关于图层和uiview的继承,uikit框架mac和xcode刚刚使用5天,很多都很晕的5天???好吧,你很牛逼了,,我刚接触mac5天的时候连属性都弄不清楚。。加油吧,你会变得很强的 我在viewDidLoad 里面设置 view的frame,没有任何效果,然后我在view的重载函数setFrame里打印发现,它在我设置之后还会被系统调用很多次,就是说,我的设置在前,系统设置在后,又把view的位置设置回去了,我到底要在哪里设置它的位置比较好啊你最后一个pic显示你那view上有2个tabbar的占位 这种情况,最好不要全部都用tabbar,你考研用一个tabbat+分段按钮这个方法好像也可以,但是上下两个tabbar的场合应该也有把http://www.gowhich.com/blog/172 这个是隐藏tabbaar的。tabbar在顶部,就需要设置view。frame contentView.frame = CGRectMake(contentView.bounds.origin.x, contentView.bounds.origin.y, contentView.bounds.size.width, contentView.bounds.size.height + self.tabBarController.tabBar.frame.size.height); 这个真的可以了,已经达到我想要的效果了,谢谢谢谢我的storyboard里的关系是TabBarController1----TabBarController2-----ViewControler21 -----ViewController22 ------ViewController11我是想设置TabBarController2的TabBar到顶部,然后把其中的View扩展的下部我在ViewControler21 里 设置self.view的frame没有效果但是在ViewControler21 里 按照如下设置就又效果了UIView *contentView; if ( [[self.tabBarController.view.subviews objectAtIndex:0] isKindOfClass:[UITabBar class]] ) contentView = [self.tabBarController.view.subviews objectAtIndex:1]; else contentView = [self.tabBarController.view.subviews objectAtIndex:0]; contentView.frame = CGRectMake(contentView.bounds.origin.x, contentView.bounds.origin.y, contentView.bounds.size.width, contentView.bounds.size.height + self.tabBarController.tabBar.frame.size.height);我有点晕了,这里的view的层级好像很复杂啊,请问有没有清晰一点的层级结构图啊你自己写的代码你还不清楚你上面的层次图????建议看看关于图层和uiview的继承,uikit框架mac和xcode刚刚使用5天,很多都很晕的5天???好吧,你很牛逼了,,我刚接触mac5天的时候连属性都弄不清楚。。加油吧,你会变得很强的谢谢鼓励,我会努力的,可否关注一下我,谢谢 关于Settings Bundle 请问 ASIFormDataRequest 在那个头文件里? IPHONE中如何获取本机IP地址,并将它转化为字符串? 99美元的弱智问题,请帮帮我 新手入门,4.3的SDK底下写的程序,怎么兼容4.3以下版本 week和strong ios7下使用presentViewController会出现ViewController遮挡住状态栏的问题 IOS Weibo登录问题 关于地图定位的需求问题 iOS推送通知获取不到deviceToken iOS tableview刷新显示数据 reloadData 为什么csdn论坛不弄一些这样子的功能?
我在viewDidLoad 里面设置 view的frame,没有任何效果,然后我在view的重载函数setFrame里打印发现,它在我设置之后还会被系统调用很多次,就是说,我的设置在前,系统设置在后,又把view的位置设置回去了,我到底要在哪里设置它的位置比较好啊
请问这个占位属性是在代码里设置吗,还是在storyboard里啊,谢谢
请问这个占位属性是在代码里设置吗,还是在storyboard里啊,谢谢
storyboard
我在viewDidLoad 里面设置 view的frame,没有任何效果,然后我在view的重载函数setFrame里打印发现,它在我设置之后还会被系统调用很多次,就是说,我的设置在前,系统设置在后,又把view的位置设置回去了,我到底要在哪里设置它的位置比较好啊
你最后一个pic显示你那view上有2个tabbar的占位 这种情况,最好不要全部都用tabbar,你考研用一个tabbat+分段按钮
请问这个占位属性是在代码里设置吗,还是在storyboard里啊,谢谢
storyboard实在不知道怎么去设置这个占位
我在viewDidLoad 里面设置 view的frame,没有任何效果,然后我在view的重载函数setFrame里打印发现,它在我设置之后还会被系统调用很多次,就是说,我的设置在前,系统设置在后,又把view的位置设置回去了,我到底要在哪里设置它的位置比较好啊
你最后一个pic显示你那view上有2个tabbar的占位 这种情况,最好不要全部都用tabbar,你考研用一个tabbat+分段按钮这个方法好像也可以,但是上下两个tabbar的场合应该也有把
我在viewDidLoad 里面设置 view的frame,没有任何效果,然后我在view的重载函数setFrame里打印发现,它在我设置之后还会被系统调用很多次,就是说,我的设置在前,系统设置在后,又把view的位置设置回去了,我到底要在哪里设置它的位置比较好啊
你最后一个pic显示你那view上有2个tabbar的占位 这种情况,最好不要全部都用tabbar,你考研用一个tabbat+分段按钮这个方法好像也可以,但是上下两个tabbar的场合应该也有把也许你看别人的看起来象tabbar的,其实就是几个美化的button实现同级切换非要做成上下tabbar的也行。。我帮你在网上找找有没有。。
我在viewDidLoad 里面设置 view的frame,没有任何效果,然后我在view的重载函数setFrame里打印发现,它在我设置之后还会被系统调用很多次,就是说,我的设置在前,系统设置在后,又把view的位置设置回去了,我到底要在哪里设置它的位置比较好啊
你最后一个pic显示你那view上有2个tabbar的占位 这种情况,最好不要全部都用tabbar,你考研用一个tabbat+分段按钮这个方法好像也可以,但是上下两个tabbar的场合应该也有把http://www.gowhich.com/blog/172 这个是隐藏tabbaar的。tabbar在顶部,就需要设置view。frame
contentView.frame = CGRectMake(contentView.bounds.origin.x, contentView.bounds.origin.y, contentView.bounds.size.width, contentView.bounds.size.height + self.tabBarController.tabBar.frame.size.height);
我在viewDidLoad 里面设置 view的frame,没有任何效果,然后我在view的重载函数setFrame里打印发现,它在我设置之后还会被系统调用很多次,就是说,我的设置在前,系统设置在后,又把view的位置设置回去了,我到底要在哪里设置它的位置比较好啊
你最后一个pic显示你那view上有2个tabbar的占位 这种情况,最好不要全部都用tabbar,你考研用一个tabbat+分段按钮这个方法好像也可以,但是上下两个tabbar的场合应该也有把http://code4app.com/ios/Sliding-Tabs/4f72eab96803fa8a50000000 看看这个怎么设置tabbar在顶部的
我在viewDidLoad 里面设置 view的frame,没有任何效果,然后我在view的重载函数setFrame里打印发现,它在我设置之后还会被系统调用很多次,就是说,我的设置在前,系统设置在后,又把view的位置设置回去了,我到底要在哪里设置它的位置比较好啊
你最后一个pic显示你那view上有2个tabbar的占位 这种情况,最好不要全部都用tabbar,你考研用一个tabbat+分段按钮这个方法好像也可以,但是上下两个tabbar的场合应该也有把http://www.gowhich.com/blog/172 这个是隐藏tabbaar的。tabbar在顶部,就需要设置view。frame
contentView.frame = CGRectMake(contentView.bounds.origin.x, contentView.bounds.origin.y, contentView.bounds.size.width, contentView.bounds.size.height + self.tabBarController.tabBar.frame.size.height); 这个真的可以了,已经达到我想要的效果了,谢谢谢谢我的storyboard里的关系是
TabBarController1----TabBarController2-----ViewControler21
-----ViewController22
------ViewController11我是想设置TabBarController2的TabBar到顶部,然后把其中的View扩展的下部
我在ViewControler21 里 设置self.view的frame没有效果
但是在ViewControler21 里 按照如下设置就又效果了
UIView *contentView;
if ( [[self.tabBarController.view.subviews objectAtIndex:0] isKindOfClass:[UITabBar class]] )
contentView = [self.tabBarController.view.subviews objectAtIndex:1];
else
contentView = [self.tabBarController.view.subviews objectAtIndex:0];
contentView.frame = CGRectMake(contentView.bounds.origin.x, contentView.bounds.origin.y, contentView.bounds.size.width, contentView.bounds.size.height + self.tabBarController.tabBar.frame.size.height);我有点晕了,这里的view的层级好像很复杂啊,请问有没有清晰一点的层级结构图啊
请问这个占位属性是在代码里设置吗,还是在storyboard里啊,谢谢
storyboard实在不知道怎么去设置这个占位
UIView *contentView;
if ( [[self.tabBarController.view.subviews objectAtIndex:0] isKindOfClass:[UITabBar class]] )
contentView = [self.tabBarController.view.subviews objectAtIndex:1];
else
contentView = [self.tabBarController.view.subviews objectAtIndex:0];
contentView.frame = CGRectMake(contentView.bounds.origin.x, contentView.bounds.origin.y, contentView.bounds.size.width, contentView.bounds.size.height + self.tabBarController.tabBar.frame.size.height);或者 如下代码UIView *contentView;
if ( [[self.view.subviews objectAtIndex:0] isKindOfClass:[UITabBar class]] )
contentView = [self.view.subviews objectAtIndex:1];
else
contentView = [self.view.subviews objectAtIndex:0];
contentView.frame = CGRectMake(contentView.bounds.origin.x, contentView.bounds.origin.y, contentView.bounds.size.width, contentView.bounds.size.height + self.tabBarController.tabBar.frame.size.height);都可以达到我想要的效果
我在viewDidLoad 里面设置 view的frame,没有任何效果,然后我在view的重载函数setFrame里打印发现,它在我设置之后还会被系统调用很多次,就是说,我的设置在前,系统设置在后,又把view的位置设置回去了,我到底要在哪里设置它的位置比较好啊
你最后一个pic显示你那view上有2个tabbar的占位 这种情况,最好不要全部都用tabbar,你考研用一个tabbat+分段按钮这个方法好像也可以,但是上下两个tabbar的场合应该也有把http://www.gowhich.com/blog/172 这个是隐藏tabbaar的。tabbar在顶部,就需要设置view。frame
contentView.frame = CGRectMake(contentView.bounds.origin.x, contentView.bounds.origin.y, contentView.bounds.size.width, contentView.bounds.size.height + self.tabBarController.tabBar.frame.size.height); 这个真的可以了,已经达到我想要的效果了,谢谢谢谢我的storyboard里的关系是
TabBarController1----TabBarController2-----ViewControler21
-----ViewController22
------ViewController11我是想设置TabBarController2的TabBar到顶部,然后把其中的View扩展的下部
我在ViewControler21 里 设置self.view的frame没有效果
但是在ViewControler21 里 按照如下设置就又效果了
UIView *contentView;
if ( [[self.tabBarController.view.subviews objectAtIndex:0] isKindOfClass:[UITabBar class]] )
contentView = [self.tabBarController.view.subviews objectAtIndex:1];
else
contentView = [self.tabBarController.view.subviews objectAtIndex:0];
contentView.frame = CGRectMake(contentView.bounds.origin.x, contentView.bounds.origin.y, contentView.bounds.size.width, contentView.bounds.size.height + self.tabBarController.tabBar.frame.size.height);我有点晕了,这里的view的层级好像很复杂啊,请问有没有清晰一点的层级结构图啊
你自己写的代码你还不清楚你上面的层次图????建议看看关于图层和uiview的继承,uikit框架
我在viewDidLoad 里面设置 view的frame,没有任何效果,然后我在view的重载函数setFrame里打印发现,它在我设置之后还会被系统调用很多次,就是说,我的设置在前,系统设置在后,又把view的位置设置回去了,我到底要在哪里设置它的位置比较好啊
你最后一个pic显示你那view上有2个tabbar的占位 这种情况,最好不要全部都用tabbar,你考研用一个tabbat+分段按钮这个方法好像也可以,但是上下两个tabbar的场合应该也有把http://www.gowhich.com/blog/172 这个是隐藏tabbaar的。tabbar在顶部,就需要设置view。frame
contentView.frame = CGRectMake(contentView.bounds.origin.x, contentView.bounds.origin.y, contentView.bounds.size.width, contentView.bounds.size.height + self.tabBarController.tabBar.frame.size.height); 这个真的可以了,已经达到我想要的效果了,谢谢谢谢我的storyboard里的关系是
TabBarController1----TabBarController2-----ViewControler21
-----ViewController22
------ViewController11我是想设置TabBarController2的TabBar到顶部,然后把其中的View扩展的下部
我在ViewControler21 里 设置self.view的frame没有效果
但是在ViewControler21 里 按照如下设置就又效果了
UIView *contentView;
if ( [[self.tabBarController.view.subviews objectAtIndex:0] isKindOfClass:[UITabBar class]] )
contentView = [self.tabBarController.view.subviews objectAtIndex:1];
else
contentView = [self.tabBarController.view.subviews objectAtIndex:0];
contentView.frame = CGRectMake(contentView.bounds.origin.x, contentView.bounds.origin.y, contentView.bounds.size.width, contentView.bounds.size.height + self.tabBarController.tabBar.frame.size.height);我有点晕了,这里的view的层级好像很复杂啊,请问有没有清晰一点的层级结构图啊
你自己写的代码你还不清楚你上面的层次图????建议看看关于图层和uiview的继承,uikit框架mac和xcode刚刚使用5天,很多都很晕的
我在viewDidLoad 里面设置 view的frame,没有任何效果,然后我在view的重载函数setFrame里打印发现,它在我设置之后还会被系统调用很多次,就是说,我的设置在前,系统设置在后,又把view的位置设置回去了,我到底要在哪里设置它的位置比较好啊
你最后一个pic显示你那view上有2个tabbar的占位 这种情况,最好不要全部都用tabbar,你考研用一个tabbat+分段按钮这个方法好像也可以,但是上下两个tabbar的场合应该也有把http://www.gowhich.com/blog/172 这个是隐藏tabbaar的。tabbar在顶部,就需要设置view。frame
contentView.frame = CGRectMake(contentView.bounds.origin.x, contentView.bounds.origin.y, contentView.bounds.size.width, contentView.bounds.size.height + self.tabBarController.tabBar.frame.size.height); 这个真的可以了,已经达到我想要的效果了,谢谢谢谢我的storyboard里的关系是
TabBarController1----TabBarController2-----ViewControler21
-----ViewController22
------ViewController11我是想设置TabBarController2的TabBar到顶部,然后把其中的View扩展的下部
我在ViewControler21 里 设置self.view的frame没有效果
但是在ViewControler21 里 按照如下设置就又效果了
UIView *contentView;
if ( [[self.tabBarController.view.subviews objectAtIndex:0] isKindOfClass:[UITabBar class]] )
contentView = [self.tabBarController.view.subviews objectAtIndex:1];
else
contentView = [self.tabBarController.view.subviews objectAtIndex:0];
contentView.frame = CGRectMake(contentView.bounds.origin.x, contentView.bounds.origin.y, contentView.bounds.size.width, contentView.bounds.size.height + self.tabBarController.tabBar.frame.size.height);我有点晕了,这里的view的层级好像很复杂啊,请问有没有清晰一点的层级结构图啊
你自己写的代码你还不清楚你上面的层次图????建议看看关于图层和uiview的继承,uikit框架mac和xcode刚刚使用5天,很多都很晕的
5天???好吧,你很牛逼了,,我刚接触mac5天的时候连属性都弄不清楚。。
加油吧,你会变得很强的
我在viewDidLoad 里面设置 view的frame,没有任何效果,然后我在view的重载函数setFrame里打印发现,它在我设置之后还会被系统调用很多次,就是说,我的设置在前,系统设置在后,又把view的位置设置回去了,我到底要在哪里设置它的位置比较好啊
你最后一个pic显示你那view上有2个tabbar的占位 这种情况,最好不要全部都用tabbar,你考研用一个tabbat+分段按钮这个方法好像也可以,但是上下两个tabbar的场合应该也有把http://www.gowhich.com/blog/172 这个是隐藏tabbaar的。tabbar在顶部,就需要设置view。frame
contentView.frame = CGRectMake(contentView.bounds.origin.x, contentView.bounds.origin.y, contentView.bounds.size.width, contentView.bounds.size.height + self.tabBarController.tabBar.frame.size.height); 这个真的可以了,已经达到我想要的效果了,谢谢谢谢我的storyboard里的关系是
TabBarController1----TabBarController2-----ViewControler21
-----ViewController22
------ViewController11我是想设置TabBarController2的TabBar到顶部,然后把其中的View扩展的下部
我在ViewControler21 里 设置self.view的frame没有效果
但是在ViewControler21 里 按照如下设置就又效果了
UIView *contentView;
if ( [[self.tabBarController.view.subviews objectAtIndex:0] isKindOfClass:[UITabBar class]] )
contentView = [self.tabBarController.view.subviews objectAtIndex:1];
else
contentView = [self.tabBarController.view.subviews objectAtIndex:0];
contentView.frame = CGRectMake(contentView.bounds.origin.x, contentView.bounds.origin.y, contentView.bounds.size.width, contentView.bounds.size.height + self.tabBarController.tabBar.frame.size.height);我有点晕了,这里的view的层级好像很复杂啊,请问有没有清晰一点的层级结构图啊
你自己写的代码你还不清楚你上面的层次图????建议看看关于图层和uiview的继承,uikit框架mac和xcode刚刚使用5天,很多都很晕的
5天???好吧,你很牛逼了,,我刚接触mac5天的时候连属性都弄不清楚。。
加油吧,你会变得很强的
谢谢鼓励,我会努力的,可否关注一下我,谢谢