I need to know my winow.rootviewcontroller name.
For example
UITabBarController *demoTabBarController = [[UITabBarController alloc] init];
[self.demoTabBarController setDelegate:self];
self.demoTabBarController.viewControllers = [NSArray arrayWithObjects:mainNavController, searchView, challengeView, nil];
self.window.rootViewController = self.demoTabBarController;
so in NSLog i want demoTabBarController as result. Is there any way i can achieve that?
Note that i dont want the class name of rootviewcontroller.
Not directly. A pointer variable doesn't save any information about what other pointer variable gave it an object reference. If you need some kind of identification information about an object's history, you'll have to subclass UITabBarController
and save what you want to display in your custom class.
(If you describe why you believe this is useful, someone might have another way to solve the more basic problem.)