在UITabBarController里
- (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
//删掉系统默认的tabBarItem
for (UIView *child in self.tabBar.subviews) {
if ([child isKindOfClass:[UIControl class]]) {
[child removeFromSuperview];
}
}
}
本文介绍如何在iOS应用中使用Objective-C编程语言,通过遍历并删除UITabBarController中的子视图来移除系统默认的TabBarItem。此方法适用于希望自定义底部导航栏样式的开发者。
4262

被折叠的 条评论
为什么被折叠?



