Sunday, January 12, 2014

storyboard design levels TabBarController, where the problem of the second stage Tabbar




Two TarBarController layout shown above



Run renderings below







The latter two figure, I adjust the position of the second stage TabBarController to above, the following code

CGRect tabBarFrame = [self.tabBar frame];

NSLog (@ "tabBarFrame% f% f% f% f",

tabBarFrame.origin.x,

tabBarFrame.origin.y,

tabBarFrame.size.width,

tabBarFrame.size.height);

tabBarFrame.origin.y = 100;

[Self.tabBar setFrame: tabBarFrame];

At this time, although tabbar up, but below its previous position, but turned black,

May I ask how the View extended down, I by setting setFrame, does not seem to have any effect

This two Tabbar should be very common now, the main Tabbar below, above
times Tabbar
Thank you, I was a beginner, the problem is weak, please let me know, my qq 53962791
Reply:
You need to set the size of the view of. . .
Reply:
That view of the downward movement of highly tababr. .
Reply:
If you do not write your own tabbar,, that there may be a system of black tabbar said placeholder, there is a property, you cancel it
Reply:
cited a floor willingYaTou reply:
you need to set the view size. . .


I set the viewDidLoad inside view of frame, there is no effect, and then I print found in view of overloaded functions setFrame years, it will be after I set up the system call many times, that is, my first set, system settings After, again view the location set back, I set it in the end to a position where relatively good

Reply:
reference to the second floor willingYaTou reply:
the view that the downward movement of highly tababr. .


Will this placeholder attribute is set in the code, or are in the storyboard, ah, thank you
Reply:
references, 5th Floor yeyunxiaofeng reply:
Quote: references to the second floor willingYaTou reply:

That view of the downward movement of highly tababr. .


Will this placeholder attribute is set in the code, or are in the storyboard, ah, thank you

storyboard
Reply:
references, 4th Floor yeyunxiaofeng reply:
Quote: references to a floor willingYaTou reply:

You need to set the size of the view of. . .


I set the viewDidLoad inside view of frame, there is no effect, and then I print found in view of overloaded functions setFrame years, it will be after I set up the system call many times, that is, my first set, system settings After, again view the location set back, I set it in the end to a position where relatively good



Your last pic showed two tabbar that placeholder on your view. . . This case, it is best not to use all tabbar, you use a tabbat + PubMed segmented button
Reply:
reference to the 6th floor willingYaTou reply:
Quote: references, 5th Floor yeyunxiaofeng reply:

Quote: references to the second floor willingYaTou reply:

That view of the downward movement of highly tababr. .


Will this placeholder attribute is set in the code, or are in the storyboard, ah, thank you

storyboard


Really do not know how to set the placeholder
Reply:
reference to the 7th floor willingYaTou reply:
Quote: references to the 4th floor yeyunxiaofeng reply:

Quote: references to a floor willingYaTou reply:

You need to set the size of the view of. . .


I set the viewDidLoad inside view of frame, there is no effect, and then I print found in view of overloaded functions setFrame years, it will be after I set up the system call many times, that is, my first set, system settings After, again view the location set back, I set it in the end to a position where relatively good



Your last pic showed two tabbar that placeholder on your view. . . This case, it is best not to use all tabbar, you use a tabbat + PubMed segmented button


This approach seems to be, but down two tabbar occasions should also have the
Reply:
reference to the 9th floor yeyunxiaofeng reply:
Quote: references to the 7th floor willingYaTou reply:

Quote: 4th Floor reply yeyunxiaofeng of references:

Quote: references to a floor willingYaTou reply:

You need to set the size of the view of. . .


I set the viewDidLoad inside view of frame, there is no effect, and then I print found in view of overloaded functions setFrame years, it will be after I set up the system call many times, that is, my first set, system settings After, again view the location set back, I set it in the end to a position where relatively good



Your last pic showed two tabbar that placeholder on your view. . . This case, it is best not to use all tabbar, you use a tabbat + PubMed segmented button


This approach seems to be, but down two tabbar occasions should have put


Maybe you see other people's looks like tabbar, in fact, achieve the same level of several beautification button switch. . . . . . Tabbar also have to be made down the line. . I can help you look online there. .
Reply:
reference to the 9th floor yeyunxiaofeng reply:
Quote: references to the 7th floor willingYaTou reply:

Quote: 4th Floor reply yeyunxiaofeng of references:

Quote: references to a floor willingYaTou reply:

You need to set the size of the view of. . .


I set the viewDidLoad inside view of frame, there is no effect, and then I print found in view of overloaded functions setFrame years, it will be after I set up the system call many times, that is, my first set, system settings After, again view the location set back, I set it in the end to a position where relatively good



Your last pic showed two tabbar that placeholder on your view. . . This case, it is best not to use all tabbar, you use a tabbat + PubMed segmented button


This approach seems to be, but down two tabbar occasions should have put


This is a hidden tabbaar http://www.gowhich.com/blog/172. . . . tabbar at the top, you need to set the 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) ;
Reply:
reference to the 9th floor yeyunxiaofeng reply:
Quote: references to the 7th floor willingYaTou reply:

Quote: 4th Floor reply yeyunxiaofeng of references:

Quote: references to a floor willingYaTou reply:

You need to set the size of the view of. . .


I set the viewDidLoad inside view of frame, there is no effect, and then I print found in view of overloaded functions setFrame years, it will be after I set up the system call many times, that is, my first set, system settings After, again view the location set back, I set it in the end to a position where relatively good



Your last pic showed two tabbar that placeholder on your view. . . This case, it is best not to use all tabbar, you use a tabbat + PubMed segmented button


This approach seems to be, but down two tabbar occasions should have put


http://code4app.com/ios/Sliding-Tabs/4f72eab96803fa8a50000000 see how this set tabbar at the top
Reply:
reference to the 11th floor willingYaTou reply:
Quote: references to the 9th floor yeyunxiaofeng reply:

Quote: 7F reply willingYaTou of references:

Quote: 4th Floor reply yeyunxiaofeng of references:

Quote: references to a floor willingYaTou reply:

You need to set the size of the view of. . .


I set the viewDidLoad inside view of frame, there is no effect, and then I print found in view of overloaded functions setFrame years, it will be after I set up the system call many times, that is, my first set, system settings After, again view the location set back, I set it in the end to a position where relatively good



Your last pic showed two tabbar that placeholder on your view. . . This case, it is best not to use all tabbar, you use a tabbat + PubMed segmented button


This approach seems to be, but down two tabbar occasions should have put


This is a hidden tabbaar http://www.gowhich.com/blog/172. . . . tabbar at the top, you need to set the 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) ;


This really can be, and has reached the effect I want, thank you thank you

My storyboard where relationships are
TabBarController1 ---- TabBarController2 ----- ViewControler21
----- ViewController22
------ ViewController11

I want to set TabBarController2 the TabBar to the top, and then put them lower
View extendedI set self.view in frame in ViewControler21 no effect
However, in accordance with the following settings in ViewControler21 and the effect on the
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) ;

I'm a little dizzy, hierarchical view here seems to be very complicated ah, what little there is no clear hierarchy diagram ah

Reply:
reference to the 8th floor yeyunxiaofeng reply:
Quote: references to the 6th floor willingYaTou reply:

Quote: 5th Floor reply yeyunxiaofeng of references:

Quote: references to the second floor willingYaTou reply:

That view of the downward movement of highly tababr. .


Will this placeholder attribute is set in the code, or are in the storyboard, ah, thank you

storyboard


Really do not know how to set the placeholder



Reply:
I found the following code to call directly TabBarController2 in
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) ;

Or the following code

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) ;

Can achieve the effect I want

Reply:
reference to the 13th floor yeyunxiaofeng reply:
Quote: references to the 11th floor willingYaTou reply:

Quote: 9th Floor reply yeyunxiaofeng of references:

Quote: 7F reply willingYaTou of references:

Quote: 4th Floor reply yeyunxiaofeng of references:

Quote: references to a floor willingYaTou reply:

You need to set the size of the view of. . .


I set the viewDidLoad inside view of frame, there is no effect, and then I print found in view of overloaded functions setFrame years, it will be after I set up the system call many times, that is, my first set, system settings After, again view the location set back, I set it in the end to a position where relatively good



Your last pic showed two tabbar that placeholder on your view. . . This case, it is best not to use all tabbar, you use a tabbat + PubMed segmented button


This approach seems to be, but down two tabbar occasions should have put


This is a hidden tabbaar http://www.gowhich.com/blog/172. . . . tabbar at the top, you need to set the 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) ;


This really can be, and has reached the effect I want, thank you thank you

My storyboard where relationships are
TabBarController1 ---- TabBarController2 ----- ViewControler21
----- ViewController22
------ ViewController11

I want to set TabBarController2 the TabBar to the top, and then put them lower
View extendedI set self.view in frame in ViewControler21 no effect
However, in accordance with the following settings in ViewControler21 and the effect on the
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) ;

I'm a little dizzy, hierarchical view here seems to be very complicated ah, what little there is no clear hierarchy diagram ah


Write your own code you do not know your level above chart? ? ? ? Look at the recommendations of inheritance on layers and uiview, uikit framework
Reply:
reference to the 16th floor willingYaTou reply:
Quote: references to the 13th floor yeyunxiaofeng reply:

Quote: references to the 11th floor willingYaTou reply:

Quote: 9th Floor reply yeyunxiaofeng of references:

Quote: 7F reply willingYaTou of references:

Quote: 4th Floor reply yeyunxiaofeng of references:

Quote: references to a floor willingYaTou reply:

You need to set the size of the view of. . .


I set the viewDidLoad inside view of frame, there is no effect, and then I print found in view of overloaded functions setFrame years, it will be after I set up the system call many times, that is, my first set, system settings After, again view the location set back, I set it in the end to a position where relatively good



Your last pic showed two tabbar that placeholder on your view. . . This case, it is best not to use all tabbar, you use a tabbat + PubMed segmented button


This approach seems to be, but down two tabbar occasions should have put


This is a hidden tabbaar http://www.gowhich.com/blog/172. . . . tabbar at the top, you need to set the 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) ;


This really can be, and has reached the effect I want, thank you thank you

My storyboard where relationships are
TabBarController1 ---- TabBarController2 ----- ViewControler21
----- ViewController22
------ ViewController11

I want to set TabBarController2 the TabBar to the top, and then put them lower
View extendedI set self.view in frame in ViewControler21 no effect
However, in accordance with the following settings in ViewControler21 and the effect on the
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) ;

I'm a little dizzy, hierarchical view here seems to be very complicated ah, what little there is no clear hierarchy diagram ah


Write your own code you do not know your level above chart? ? ? ? Look at the recommendations of inheritance on layers and uiview, uikit framework


mac and xcode just 5 days, a lot of very faint
Reply:
cited 17 floor yeyunxiaofeng reply:
Quote: references to the 16th floor willingYaTou reply:

Quote: Reply yeyunxiaofeng 13th floor of references:

Quote: references to the 11th floor willingYaTou reply:

Quote: 9th Floor reply yeyunxiaofeng of references:

Quote: 7F reply willingYaTou of references:

Quote: 4th Floor reply yeyunxiaofeng of references:

Quote: references to a floor willingYaTou reply:

You need to set the size of the view of. . .


I set the viewDidLoad inside view of frame, there is no effect, and then I print found in view of overloaded functions setFrame years, it will be after I set up the system call many times, that is, my first set, system settings After, again view the location set back, I set it in the end to a position where relatively good



Your last pic showed two tabbar that placeholder on your view. . . This case, it is best not to use all tabbar, you use a tabbat + PubMed segmented button


This approach seems to be, but down two tabbar occasions should have put


This is a hidden tabbaar http://www.gowhich.com/blog/172. . . . tabbar at the top, you need to set the 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) ;


This really can be, and has reached the effect I want, thank you thank you

My storyboard where relationships are
TabBarController1 ---- TabBarController2 ----- ViewControler21
----- ViewController22
------ ViewController11

I want to set TabBarController2 the TabBar to the top, and then put them lower
View extendedI set self.view in frame in ViewControler21 no effect
However, in accordance with the following settings in ViewControler21 and the effect on the
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) ;

I'm a little dizzy, hierarchical view here seems to be very complicated ah, what little there is no clear hierarchy diagram ah


Write your own code you do not know your level above chart? ? ? ? Look at the recommendations of inheritance on layers and uiview, uikit framework


mac and xcode just 5 days, a lot of very dizzy



5 days? ? ? Well, you are very fast hardware, and, I am new mac5 days when even the property Dunong unclear. .
Come on, you become a strong

Reply:
cited 18 floor willingYaTou reply:
Quote: references to 17th floor yeyunxiaofeng reply:

Quote: references to the 16th floor willingYaTou reply:

Quote: Reply yeyunxiaofeng 13th floor of references:

Quote: references to the 11th floor willingYaTou reply:

Quote: 9th Floor reply yeyunxiaofeng of references:

Quote: 7F reply willingYaTou of references:

Quote: 4th Floor reply yeyunxiaofeng of references:

Quote: references to a floor willingYaTou reply:

You need to set the size of the view of. . .


I set the viewDidLoad inside view of frame, there is no effect, and then I print found in view of overloaded functions setFrame years, it will be after I set up the system call many times, that is, my first set, system settings After, again view the location set back, I set it in the end to a position where relatively good



Your last pic showed two tabbar that placeholder on your view. . . This case, it is best not to use all tabbar, you use a tabbat + PubMed segmented button


This approach seems to be, but down two tabbar occasions should have put


This is a hidden tabbaar http://www.gowhich.com/blog/172. . . . tabbar at the top, you need to set the 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) ;


This really can be, and has reached the effect I want, thank you thank you

My storyboard where relationships are
TabBarController1 ---- TabBarController2 ----- ViewControler21
----- ViewController22
------ ViewController11

I want to set TabBarController2 the TabBar to the top, and then put them lower
View extendedI set self.view in frame in ViewControler21 no effect
However, in accordance with the following settings in ViewControler21 and the effect on the
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) ;

I'm a little dizzy, hierarchical view here seems to be very complicated ah, what little there is no clear hierarchy diagram ah


Write your own code you do not know your level above chart? ? ? ? Look at the recommendations of inheritance on layers and uiview, uikit framework


mac and xcode just 5 days, a lot of very dizzy



5 days? ? ? Well, you are very fast hardware, and, I am new mac5 days when even the property Dunong unclear. .
Come on, you become a strong


Thank encouragement, I will work hard, could look me, thank you

No comments:

Post a Comment