I am using KTPhotoBrowser. Can any one tell me why when I use the TabBarSample of this code in my project, I am not able to make the photos work for landscape? The photos always display in portrait mode as my project only runs in portrait. How do I solve this issue? I have added the following
-(BOOL)shouldAutorotate {
return YES;
}
in SDWebImageRootViewController.m
but still no luck.
Please can anyone download this and see why the TabBarSample(project) not working for the landscape ?
I highly recommend Ryan's answer for anyone else who read this.
But in this particular case, what happened was the UITabBarController is not being set as the root view controller in the app window. I can only guess that this worked differently before iOS 6 (that Github project is 3 years old). Therefore you got this message in the log:
Application windows are expected to have a root view controller at the end of application launch
To solve this, change this line in your app delegate:
[window addSubview:tabBarController.view];
To this:
[self.window setRootViewController:tabBarController];
And then as Anill said, we need to make sure all of the view controllers in the tab bar agree to rotate.