Swift

navigationbarに画像を設定

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