通过查看层级结构去掉导航控制器的下横线:
for (UIView *aView in self.navigationController.navigationBar.subviews) {
if ([aView isKindOfClass:NSClassFromString(@"_UIBarBackground")]) {
for (id obj in aView.subviews) {
if ([obj isKindOfClass:[UIImageView class]]) {
[obj setHidden:YES];
}}}}
去掉tabbar控制器的上横线:
[UITabBar appearance].clipsToBounds = YES;
网友评论