There is a navgationController for my rootViewController application.
I found that the pushed controller
-(BOOL)shouldAutorotate not called.
and
-(NSUInteger)supportedInterfaceOrientations is called only once.
I correctly checked the project summary (or plist ) in xcode's to support all window orientations.
I want this method to be called, since there is some uicontrol positioning code that I want to execute programmatically to change the orientation.
I solved this problem by overriding the (category) navigation controller with the following methods
-(BOOL)shouldAutorotate; -(NSUInteger)supportedInterfaceOrientations;
I checked which controller is pressed and, accordingly, called the corresponding pushed positioning code of the uicontrol controller in the navigation controller, following the method
(NSUInteger)supportedInterfaceOrientations;
This works fine, but I don't think this is the right way. Please help me for a better solution.
Aditya deshmane
source share