What UINavigationController event can be overridden to get access to current view controller?
My end goal is to check the current screen in the Navigation Controller to determine whether or not to call SetNavigationBarHidden.
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.
If by “current” you mean “currently visible” you can make use of UINavigationController’s VisibleViewController property. Though if you’re using MT.D you’ll want to cast it out:
Alternatively you could access the ViewController array directly. Or…you can also subclass DialogViewController and set the NavigationBar.Hidden = true inside the implementation.