LoginSignup
0

More than 5 years have passed since last update.

UIBarButtonItemにTintColorではなくオリジナルの画像を表示する

Posted at

UIBarButtonItemに画像を設定しても色がTintColorに依存してしまう

オリジナルの画像を表示したい場合は

ViewController.swift
barButtonItem.image = image.withRenderingMode(.alwaysOriginal)

でオリジナルの画像がでる

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
What you can do with signing up
0