jeudi 28 juillet 2016

Trying to make rightBarButton appear after making it disappear using Swift

I currently am working on an app in Swift where in my viewDidLoad() method I have purposely hidden my rightBarButton on my navigation bar like this:

self.navigationItem.rightBarButtonItem = UIBarButtonItem(barButtonSystemItem: .Done, target: self, action: #selector(TableViewController.dismiss))
self.navigationItem.setRightBarButtonItem(nil, animated: true)

However, under certain circumstances, I would like to display the rightBarButton. How would I do this? What would be the opposite of the above line of code? Just wondering.

Thanks in advance to all who reply.

Aucun commentaire:

Enregistrer un commentaire