0
I’m making an APP and would like the screen to always be in Portrait. I looked it up online, but I couldn’t find out. I tried using the Uiinterfaceorientation framework Uikit, but it did not work.
0
I’m making an APP and would like the screen to always be in Portrait. I looked it up online, but I couldn’t find out. I tried using the Uiinterfaceorientation framework Uikit, but it did not work.
1
The easiest way to do it is through the design settings.
Select your main project (in the case of example is PMB), and after that choose the target that you will make this change (probably only have 1 option for you to select, unless you have created multiple targets).
Go on the tab General > Deployment info and leave only the guidance you want, in that case, Portrait.
-1
I was able to find a way :D
Using Uikit.framework
File. h
-(NSUInteger) supportedInterfaceOrientations;
File. m
- (void)viewDidLoad {
[super viewDidLoad];
self.supportedInterfaceOrientations;
}
- (NSUInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskPortrait;
}
Browser other questions tagged objective-c mobile xcode
You are not signed in. Login or sign up in order to post.