My app does not support Portrait mode but at times it turning into portrait mode

79 views Asked by At

My app does not support Portrait mode but at times it turning into portrait mode. I am using Xcode 5.02 & I am running my app on iOS7. I unchecked the portrait mode in the settings so that it does not support portrait, but at a point of time it is turning into portrait, I dont have any clue, any one to help me out, my app is master-detail base. This below code snippet in app delegate & dashboardNavController is UINavigationController

self.window.rootViewController = self.dashboardNavController;
[self.window makeKeyAndVisible];

if needed I am glad to provide more informations, Thanks in advance

1

There are 1 answers

0
makboney On

Try this in ViewDidLoad

CGAffineTransform transform = CGAffineTransformMakeRotation(-M_PI/2);
self.view.transform = transform;

// Repositions and resizes the view.
// If you need NavigationBar on top then set height appropriately 
CGRect contentRect = CGRectMake(0, 0, self.view.size.height, self.view.size.width);
self.view.bounds = contentRect;