I am using background image for the navigation bar. And it is crashing my app while presenting a view controller. I am also having the background image for all the view controller's view. I am using implementing like this
func setNavigationAppearance(tintColor : UIColor, barTintColor : UIColor?) {
let navigationBarAppearace = appDelegateObj.navigationController!.navigationBar
navigationBarAppearace.tintColor = tintColor
navigationBarAppearace.barTintColor = barTintColor
navigationBarAppearace.translucent = false
//navigationBarAppearace.
//Settign the Custome Font and TextColor
if let font = UIFont(name: FontCustom.Regular, size: 17) {
UINavigationBar.appearance().titleTextAttributes = [NSFontAttributeName: font ,NSForegroundColorAttributeName : tintColor]
}
}
I call this method with this image let navigationColor : UIColor = UIColor(patternImage: UIImage(named: AppImagesName.PatternRed)!)
And I am getting these crash logs.
terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Only RGBA or White color spaces are supported in this situation
I Googled about this, all are saying that remove the background image or this is iOS bug.
So please let me know what could be the solution.