iOS 7 tabBar-line, how to remove it?

前端 未结 12 1286
执笔经年
执笔经年 2021-01-31 07:52

Apple has added a tiny line over the tabBar in iOS 7 which is supposed to work as a shadow or fade between the tabBar and the UI

12条回答
  •  生来不讨喜
    2021-01-31 08:40

    In my case I also needed to set a different shadow, in the end the only thing that worked while also setting a custom shadow was to add a single-point high UIView 1 point above the tab bar:

        UIView *whiteLine = [[UIView alloc] initWithFrame:CGRectMake(0.0, -1.0, self.tabBar.frame.size.width, 1.0)];
        whiteLine.backgroundColor = [UIColor whiteColor];
        [self.tabBar addSubview:whiteLine];
    

提交回复
热议问题