samedi 1 août 2015

swift adding image in navigation bar

I am trying to add an image to the navigation bar by:

let image = UIImage(named: "my-image")
navigationItem.titleView = UIImageView(image: image)

But nothing happens, what am I doing wrong?

Aucun commentaire:

Enregistrer un commentaire