Swift 2 - iOS: disable a bar button
<p>In the Code below, i created 2 right bar buttons using swift 2.</p>

<p>At this moment, i want to make something like that:</p>

<pre><code>accountButton.disable = false
</code></pre>

<p>But that is not possible.</p>

<p>What is the best solution to disable this bar button ? </p>

<pre><code>let accountImage   = UIImage(named: "account")!
let settingImage   = UIImage(named: "setting")!
let accountButton  = UIBarButtonItem(image: accountImage,  style: .Plain , target: self, action: "didTapEditButton:")

let settingButton  = UIBarButtonItem(image: settingImage,  style: .Plain, target: self, action: "didTapSearchButton:")

navigationItem.rightBarButtonItems = [accountButton , settingButton]
</code></pre>