What is Tabbarcontroller
Tabbar, usually used to toggle viewcontrollers under each other. There are several ways to use it, the most common is the designation of Tabarray, which in order to store the controllers object for the following switch. This operation can be placed inside the appdelegate, and finally, join the window.
Deep understanding of Tabbarcontroller
I have tried to put the tabbarcontroller,tabbar of the Hidden=yes, then found that the following black Tabbar no, but there will be white things covered above. Background Color is not set to clear. Later found tabbar the actual content of the place, set the height of the small. So that makes it look white. Later, the content of the elongated, tabbar although still in the bottom of that position, but after hidden, there will be no white effect.
if ([[[Self.view.subviews objectatindex:0] Iskindofclass:[uitabbar class]])
Contentview = [Self.view.subviews objectatindex:1];
Else
Contentview = [Self.view.subviews objectatindex:0];
Get content View
。 How to customize Tabbarcontroller
1. The first way is to completely rewrite the Tabbarcontroller, use the view to replace, the above is a button, the workload is very large, one thing is that the switch between the various levels can not get too thorough. What time is it on top, below, when to hide.
2. The second is to inherit a uitabbarcontroller and then add a view to the upper level of the subclass. The advantage of this is to switch directly through the hide of the Tabbar to relay on the line.
The relay function. -(void) SwitchView: (ID) sender
{int index = [self.subviews Indexofobject:sender];
Tabbarctrl.selectedindex = index;
}
Finally, when we need to Badgevale, don't forget to go to 320 to find useful.