how can I remove the top border on UIToolBar

后端 未结 11 700
一生所求
一生所求 2021-02-02 05:14

I have set my UIToolBar tint color to some value, and there is this border line that I see in which I want to remove:

相关标签:
11条回答
  • 2021-02-02 05:56

    You can do like this:

    self.navigationController.toolbar.clipsToBounds = YES;
    
    0 讨论(0)
  • 2021-02-02 05:56
    toolbar1.clipsToBounds = YES;  
    

    Worked for me incase someone is still trying with Navigational bar

    0 讨论(0)
  • 2021-02-02 05:56
    navigationController?.toolbar.barTintColor = .white
    
    navigationController?.toolbar.setShadowImage(UIImage(), forToolbarPosition: .any)
    

    0 讨论(0)
  • 2021-02-02 06:00
    [[UIToolbar appearance] setBackgroundImage:[[UIImage alloc] init] forToolbarPosition:UIBarPositionBottom barMetrics:UIBarMetricsDefault];
    
    [[UIToolbar appearance] setShadowImage:[[UIImage alloc] init] forToolbarPosition:UIBarPositionBottom];
    
    [UIToolbar appearance].barTintColor = [UIColor ...];```
    
    0 讨论(0)
  • 2021-02-02 06:09

    Setting the style to UIBarStyleBlackTranslucent did it for me (iOS 6)

    0 讨论(0)
提交回复
热议问题