Hi,

When you set the title of the navigation item, it renames the view controller 
as well, so there’ isn’t any problem with that.

The reason you aren't seeing the button is that you have it connected to the 
backBarButtonItem.  Since the navigation bars app is the top most view 
controller, the button won’t show when you run the app because there isn’t 
anything to go back to.
You might find the UINavigationItem reference helpful at 
https://developer.apple.com/library/ios/documentation/UIKit/Reference/UINavigationItem_Class/
 
<https://developer.apple.com/library/ios/documentation/UIKit/Reference/UINavigationItem_Class/>.

If you want to see the button, you could just connect it to the left or wright 
barbuttonitems instead.
So, you haven’t done anything wrong and everything seems to be working 
correctly.
Hope this helps.

On Aug 4, 2015, at 8:35 AM, Venkatesh Potluri <[email protected]> wrote:

Hi Barry,
Thank you so much for the clear explanation. I was able to go a step further, 
embed it and add a title to the navigation bar. However, when I add the title, 
I observe the viewController seen is renamed with the title. I also tried 
adding a barButtonItem as per your instructions and connect it one of the 
outlet from the navigation item in the now renamed seen to the barButtonItem.  
I named the barButtonItem “play”. When I run the app and navigate the simulator 
with VoiceOver, I hear VoiceOver speak only the title of the navigationBar. 
Where am I going wrong?
My effort to add a navigationBar for now is to complete a tutorial to learn 
building apps for iOS. I am attaching 2 files that may help you get a clear 
idea of where I am going wrong.
1. “my implementation.zip” contains my xCode project. In this project, I 
attempted to add a navigation bar and a barButtonItem to it.
2. “original source.zip” contains the xCode project provided in the tutorial. 
My aim is to build a replica or an app similar to this.
It would be of great help if you could help me identify my mistake.
Once again, Thank you so much for taking the time to help me understand this.
Thank you.
Regards,
Venkatesh Potluri 

On Mon, Aug 3, 2015 at 9:46 PM, Barry Hadder <[email protected] 
<mailto:[email protected]>> wrote:
Hi,

You drag a bar button from the library to the view controller seen.
To connect the bar button to the nav bar, you find the navigation item in the 
view controller seen and drag from one of it’s outlets to the bar button.
Let me know if that still isn’t clear.

On Aug 3, 2015, at 10:10 AM, [email protected] <mailto:[email protected]> 
wrote:

Thank U!
That makes things a bit more clear.
You said, to add UIBarButton items, drag onto the view controller seen.
What exactly do I drag on to the view controller seen?
You said, you drag from one of the navigation barButtonItems outlets. Didn't 
really get that part.
If explaining through email would be difficult, I would be happy to contact you 
off list and we could set up a Skype call.
I really appreciate your effort to explain this procedure in a clear way to me.
Thank U so much for your time
Regards,
Venkatesh Potluri 

Sent from my iPhone

On 03-Aug-2015, at 7:53 pm, Barry Hadder <[email protected] 
<mailto:[email protected]>> wrote:

> This is the way you add a navigation bar to a view controller.
>  Select the view controller and in the editor->embed in menu choose 
> navigation controller.
> To add UIBarButtonItems, drag on to the view controller seen.  Then in that 
> same seen, you should find a navigation item.  You set the title and make 
> connections from it.  To add a button to the bar, you drag from one of the 
> navigation item’s outlets to the bar button.
> 
> After embedding the view controller, you will also have a navigation 
> controller seen where the navigation bar is located.  When you embedded the 
> view controller, it added it to the storyboard and connected it’s relation 
> segue to the view controller.  You need to make sure that the navigation 
> controller is set as the initial view controller in the attributes inspector.
> 
> Toolbars are different.  To add a toolbar, just drag one to the content view 
> and position it at the bottom of the view.
> 
> On Aug 2, 2015, at 10:44 PM, [email protected] <mailto:[email protected]> 
> wrote:
> 
> Thank you for the help!
> Could you explain in a bit more elaborate way?
> Do I do what you suggested after adding in navigation bar? Moreover, is the 
> procedure similar for adding a toolbar?
> 
> Sent from my iPhone
> 
> On 02-Aug-2015, at 8:35 pm, Barry Hadder <[email protected] 
> <mailto:[email protected]>> wrote:
> 
>> Hi,
>> 
>> 
>> 
>> First, you would embed the view controller in a navigation controller from 
>> the editor menu.
>> 
>> You should then find a navigation item in the controller seen when you 
>> expand the controller.  You set the title of the bar in it’s inspector and 
>> make connections as well.  In the connections inspector, drag from one of 
>> it’s outlets, e.g., backBarButtonItem, leftBarButtonItem, rightBarButtonItem 
>> to the bar button you dragged to that seen.
>> 
>> On Sunday, August 2, 2015 at 1:52:56 AM UTC-5, Venkatesh Potluri wrote:
>> Hi, 
>> Using voice over, I typically add labels, buttons and text fields by 
>> dragging them from the library to the document outlin in the Interface 
>> builder.  I change the attributes such as the title, label text, et cetera 
>> using the attributes inspector. However, I am unable to change the title of 
>> the navigation bar in this way. How do I do that? Is dragging a bar button 
>> on to the navigation bar in the document outline the correct way to add bar 
>> buttons to the navigation bar? 
>> Thank you. 
>> Regards, 
>> Venkatesh 
>> 
>> Sent from my iPhone
>> 
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "MacVisionaries" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] 
>> <mailto:[email protected]>.
>> To post to this group, send email to [email protected] 
>> <mailto:[email protected]>.
>> Visit this group at http://groups.google.com/group/macvisionaries 
>> <http://groups.google.com/group/macvisionaries>.
>> For more options, visit https://groups.google.com/d/optout 
>> <https://groups.google.com/d/optout>.
> 
> 
> -- 
> You received this message because you are subscribed to a topic in the Google 
> Groups "MacVisionaries" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/macvisionaries/wJBKeZ4tAjE/unsubscribe 
> <https://groups.google.com/d/topic/macvisionaries/wJBKeZ4tAjE/unsubscribe>.
> To unsubscribe from this group and all its topics, send an email to 
> [email protected] 
> <mailto:[email protected]>.
> To post to this group, send email to [email protected] 
> <mailto:[email protected]>.
> Visit this group at http://groups.google.com/group/macvisionaries 
> <http://groups.google.com/group/macvisionaries>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.
> 
> Barry Hadder
> [email protected] <mailto:[email protected]>
> 
> 
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "MacVisionaries" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] 
> <mailto:[email protected]>.
> To post to this group, send email to [email protected] 
> <mailto:[email protected]>.
> Visit this group at http://groups.google.com/group/macvisionaries 
> <http://groups.google.com/group/macvisionaries>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.


-- 
You received this message because you are subscribed to a topic in the Google 
Groups "MacVisionaries" group.
To unsubscribe from this topic, visit 
https://groups.google.com/d/topic/macvisionaries/wJBKeZ4tAjE/unsubscribe 
<https://groups.google.com/d/topic/macvisionaries/wJBKeZ4tAjE/unsubscribe>.
To unsubscribe from this group and all its topics, send an email to 
[email protected] 
<mailto:[email protected]>.
To post to this group, send email to [email protected] 
<mailto:[email protected]>.
Visit this group at http://groups.google.com/group/macvisionaries 
<http://groups.google.com/group/macvisionaries>.
For more options, visit https://groups.google.com/d/optout 
<https://groups.google.com/d/optout>.

Barry Hadder
[email protected] <mailto:[email protected]>




-- 
You received this message because you are subscribed to the Google Groups 
"MacVisionaries" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected] 
<mailto:[email protected]>.
To post to this group, send email to [email protected] 
<mailto:[email protected]>.
Visit this group at http://groups.google.com/group/macvisionaries 
<http://groups.google.com/group/macvisionaries>.
For more options, visit https://groups.google.com/d/optout 
<https://groups.google.com/d/optout>.

<my implementation.zip><source implementation.zip>

Barry Hadder
[email protected]



-- 
You received this message because you are subscribed to the Google Groups 
"MacVisionaries" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/macvisionaries.
For more options, visit https://groups.google.com/d/optout.

Reply via email to