Posted at

navigationbarに画像を設定

More than 1 year has passed since last update.

let imageView = UIImageView(frame: CGRect(x: 0, y: 0, width: 5, height: 10))

imageView.contentMode = .scaleAspectFit
let image = UIImage(named: "emotion")
imageView.image = image
self.navigationItem.titleView = imageView