adding button to the navigation bar
<p>i have a problem while adding button to the navigation bar.. My application consist of two view controllers added to the viewControllers array of a tabBarController. Inturn this tabBarController is added to the viewControllers array of a navigationController. In one of the views i have a textfield for entering dates . On the tap of this textfield the datepicker will pop up. simultaneously i want to display a done button on the navigation bar.  how can i do this... i tried using</p>

<pre><code>self.tabBarController.navigationController.navigationItem.rightBarButtonItem = self.doneButton;
</code></pre>

<p>But this is not working...</p>

<p>Pls help me out.. </p>
