0

I'm attempting to make my navigation bar have the exact same style as the tab bar. While it's easy enough to set the navigation bar to be translucent. It's no where near the same "frosty glass" translucency effect that the tab bar has. From just glancing, it would appear that the tab bar implements some sort of light gray color with more transparency.

I've attached an image that shows the closest I was able to get. Does anyone have any ideas on how to accomplish this?

jscs
  • 63,694
  • 13
  • 151
  • 195
Alex Ritter
  • 1,009
  • 3
  • 18
  • 40

1 Answers1

1

I think it would be better to design a png image like that with photoshop and then set that image as a background to the navigation var with the following code.

UINavigationBar.appearance().setBackgroundImage(UIImage(named: "image")!.resizableImage(withCapInsets: UIEdgeInsetsMake(0, 0, 0, 0), resizingMode: .stretch), for: .default)
  • It's a good thought, and I did try that. However, I am unable to achieve the "blurry effect" that ios puts in the tab bar. I can make it translucent, but I can't blur the image behind it with a custom background image. – Alex Ritter Jan 02 '18 at 22:12
  • i found another solution,there are few ways you could try.[https://stackoverflow.com/questions/25845855/transparent-navigation-bar-ios] – Adnan Afsari Jan 02 '18 at 22:51