Home How do I show/hide a UIBarButtonItem?
Reply: 0

How do I show/hide a UIBarButtonItem?

user536
1#
user536 Published in June 20, 2018, 7:18 am

I created a toolbar in IB with several buttons. I would like to be able to hide/show one of the buttons depending on the state of the data in the main window.

UIBarButtonItem doesn't have a hidden property, and any examples I've found so far for hiding them involve setting nav bar buttons to nil, which I don't think I want to do here because I may need to show the button again (not to mention that, if I connect my button to an IBOutlet, if I set that to nil I'm not sure how I'd get it back).

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.464451 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO