I’m building a navigation based app (few views embedded in a navigation controller).
I’m wondering if I can get the title property from inside view B of the previous view (view A) and NSLog it out for example!
thanks
Luca
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes you can.
Look at UINavigationController’s
viewControllersproperty.That returns an array of the view controllers behind the one the user is currently looking at. So look at the last view controller (or “n-2, where n is the nmber of items in the array”, according to the Apple documentation I linked for you), and you can get your title from that view controller’s nav bar.