views:

41

answers:

1

i want to know which view controller is on top of screen at a particular time so that i can control that views...

i have a 2 buttons on my bottom navigation bar,and one of these buttons pressed i should have to load particular view and and these buttons will appear in all views ...

i am pushing visit view whenever i press visit button ,but when i press visit button in visit view is gets pushing new view on existing visit view ,so whenever i press back is not getting me to previous view suddenly ...

so i want to eliminate these condition

+2  A: 

I'm having a hard time parsing that question, but it sounds to me as though you might be looking for the topViewController and visibleViewController properties of UINavigationController.

Sixten Otto