Remove border between View and Search Bar

前端 未结 7 826
傲寒
傲寒 2020-12-17 14:54

So in Xcode I\'m trying to create a seamless search bar. So I\'m trying to replicate something like this

Note how the status bar is the same color as the s

相关标签:
7条回答
  • 2020-12-17 15:27

    For iOS 7+:

    searchBar.backgroundImage = UIImage()
    

    Otherwise this will work on all iOS versions:

    searchBar.layer.borderWidth = 1
    searchBar.layer.borderColor = thatBlueColor.CGColor
    
    0 讨论(0)
提交回复
热议问题