Remove border between View and Search Bar

前端 未结 7 837
傲寒
傲寒 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:07

    In my case, beyond the edge of search bar needed to take the edge off also the navigation bar.

    C# code:

    NavigationController.NavigationBar.ShadowImage = new UIImage();
    NavigationController.NavigationBar.SetBackgroundImage (new UIImage (), UIBarMetrics.Default);
    

    Swift code:

    self.navigationController.navigationBar.shadowImage = UIImage()
    self.navigationController.navigationBar.setBackgroundImage(UIImage(), forBarMetrics: .Default)
    

提交回复
热议问题