<p>I would like to dynamically hide a button in one of my views depending on a certain condition.</p>

<p>I tried adding some code to the view controller's <code>-viewWillAppear</code> method, to make the button hidden before displaying the actual view, but I still don't know how to do that.</p>

<p>I have a reference to the button through an IBOutlet, but I'm not sure how to move forward from here. For reference, this is a UIBarButtonItem instance.</p>

Just set the button's hidden property to true:
```
```
myButton.hidden = YES;
```
```