I want to set the UINavigationbar
backgroundColor
to a gradient color where I would like to set it via an array of colors to create a Gradient, ideally, as accessible methods inside UINavigationBar
to change its color to this gradient.
Any suggestions? (Aside from setting an image manually as the background image of the navigation bar)
Create gradient layer and add it as background of navigation bar.
For creating image from layer.
One more thing, there is one library available in github : CRGradientNavigationBar you can also use this library.