iOS 7 tabBar-line, how to remove it?

前端 未结 12 1441
执笔经年
执笔经年 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:32

    Swift

    Nice simple solution:

    Write this below code in your custom tab bar class. Then it will hide horizontal shadow line.

    self.tabBar.setValue(true, forKey: "_hidesShadow")
    

    Objective C

    [self.tabBar setValue:@(YES) forKeyPath:@"_hidesShadow"];
    

提交回复
热议问题