-
Notifications
You must be signed in to change notification settings - Fork 765
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Landscape Mode? #70
Comments
No landscape support. In the past I've subclassed UINavigationController and added the following: #import "NonRotatingNavigationController.h"
@interface NonRotatingNavigationController ()
@end
@implementation NonRotatingNavigationController
- (NSUInteger)supportedInterfaceOrientations {
return UIInterfaceOrientationMaskPortrait;
}
- (BOOL)shouldAutorotate {
return NO;
}
@end
|
Thanks! any clue on how to do it with Swift? |
Swift could should be virtually identical to this, other than the minor syntax differences. Just implement those two methods and return those two values in a subclassed navigation controller. |
Not sure what header files to import, or even if I have to. hmm I used a lot of the code from Seanicus' repo. He forked yours. No header files in that one. |
What header files do you need to import for what, specifically? |
You need to create a |
Then, in your app delegate, you want something like this:
Porting that to swift should be easy and this should be enough to get you started. If you need any more help, I'd advise going through the demo project and learning how it works, there are multiple examples there, and like I said swift is similar enough to objective-c that you should be able to figure it out by looking at the examples. |
Yea, realized I had used ViewController rather than Navigation. I will take a look at the code. Thanks. |
This is what I used to get it to go to Landscape mode. Added this code in the onBoardingViewController.Swift file! Still a bit bugy but it seems to be OK for right now. //**********
|
Any way to implement Landscape mode?
Alternatively, how would I "wrap it in a subclassed UINavigationController that only supports portrait"
The text was updated successfully, but these errors were encountered: