2

I have got this code in AppDelegate U

INavigationBar.appearance().backIndicatorImage = #imageLiteral(resourceName: "backarrow")

And even though the image's color is white it shows it as blue.How can i change the tintcolor of this image?

Bilal
  • 18,478
  • 8
  • 57
  • 72
sakoaskoaso
  • 347
  • 4
  • 17

2 Answers2

3
  1. Go to Assets.xcassets
  2. Select your image backarrow
  3. Show the Attributes Inspector
  4. Change Render As value form Default to Original Image

enter image description here

Bilal
  • 18,478
  • 8
  • 57
  • 72
0

Swift 5.x & Xcode 12 Solution:

let image = UIImage(named: "abc")!.withRenderingMode(.alwaysOriginal)
navigationBar.backIndicatorImage = image
navigationBar.backIndicatorTransitionMaskImage = image
Baran
  • 2,710
  • 1
  • 23
  • 23