objective c - Detect rootcontroller in iphone sdk -


i have using 2 types of controller in application i.e. navigationcontroller , presentviewcontroller. how can detect base controller @ instance through code i.e using navigation or presentviewcontroller transist 1 viewcontroller viewcontroller?

try take rootviewcontroller of navigation:

uiviewcontroller *topviewcontroller = [self.navigationcontroller topviewcontroller];  

Comments