Recent work encountered a situation in which the tabbar in the iOS8 of their own definition overlap. It's the Uitabbarbutton that's been removed.
Toss for a long, do not know the reason lies.
Finally, scroll through the document. Said in IOS8 is allowed to dynamically add Tabbaritem. So, I guess that's not the reason. Then why is there no problem with iOS7?
Back to the chase. Since it is dynamically added. So follow Apple's usual style. This method must be called Viewwillautolayout.
Workaround:
-(void) viewwilllayoutsubviews{
[Super viewwilllayoutsubviews];
for (UIView *child in self . TabBar. Subviews) {
if ([Child iskindofclass:nsclassfromstring(@ "Uitabbarbutton")]) {
[Child Removefromsuperview];
}
}
}
-(void) Viewwillappear: (BOOL) animated
{
// Delete system auto-generated Uitabbarbutton
for (UIView *child in self . TabBar. Subviews) {
if ([Child iskindofclass: [uicontrol class]]) {
[Child Removefromsuperview];
}
}
[Super viewwillappear: animated];
}
IOS8 Custom Uitabbar (problems with Uitabbarbutton overlap caused by using Poptoviewcontroller)