What is tabbarcontroller?
Tabbar, which is usually used to switch between viewcontrollers. There are several usage methods. The most common one is to specify the tabarray, which stores the controllers object in order as the switch below. This operation can be placed in appdelegate and added to the window.
In-depth understanding of tabbarcontroller
I tried tabbarcontroller, and hidden = yes of tabbar. Then I found that the black tabbar is missing, but there will be white things on it. The background color cannot be set to clear. Later, we found that the height of the actual content of tabbar is smaller. So it looks white. Later, the content is extended. Although tabbar is still in the position below, it will not have the white effect after hiding it.
If ([[self. View. subviews objectatindex: 0] iskindofclass: [uitabbar class])
Contentview = [self. View. subviews objectatindex: 1];
Else
Contentview = [self. View. subviews objectatindex: 0];
View the content
.How to customize tabbarcontroller
1. The first method is to completely rewrite tabbarcontroller and use view instead. The buttons above are used, and the workload is very large. One thing is that the switchover between different levels cannot be too thorough. When is it on top, and when is it hidden.
2. The second is to inherit a uitabbarcontroller and add a View to the upper layer of this subclass. The advantage of this is that you can switch directly through the tabbar of hide.
Intermediate function. -(Void) switchview :( ID) sender
{Int Index = [self. subviews indexofobject: sender];
Tabbarctrl. selectedindex = index;
}
Finally, when we need badgevale, don't forget to go to 320 to find useful ones.