Force horizontal screen on iOS 9 and force horizontal screen on ios 9
First, only one portrait is left in the Supported interface orientations option in the plist file.
Use the following code to force a horizontal screen
Self.
) { return uiinterfaceorientationmaskportrait | Uiinterfaceorientationmasklandscaperight; } else{ return uiinterfaceorientationmaskportrait;} }Step 3: All Viewcontroller in my project are controlled by Navigationcontroller, so just set it up in a viewcontroller that needs to support a horizontal screen:-(void) Viewdidappear: (BOOL) animated{ [Slidenavigationcontroller sharedinstance].supportlandscape = YES;} -(void) Viewdiddisap
1. General Settings screen rotation (Device Orientation | | info.plist-----The settings in these two places are synchronous )1) targets->general->deployment Info->device Orientation directly tick the desired device to locate the global properties2) Supporting files->info.plist->supported interface Orientations Delete attribute value2. Individual Page Force screenCreate a new Navigationcontroller classImplem
Encountered in the development of a ativity need to force horizontal screen, for example: a ativity is responsible for playing video, vertical screen looks extremely ugly, then simply open the activity when you let it horizontal screen display.This requires finding the activity in the manifest file and then adding a li
Recently work has written a mobile page, it was nothing, but there is a request feel very strange, has not encountered before, that is, I wrote this page needs to be placed in an app, but this app is horizontal screen, Open this page webview is also horizontal screen (the latest version of the app when the vertical screen webview), originally we are using the REM
Orientationeventlistener, you need to create a member variable:Orientationeventlistener Mscreenorientationeventlistener;To initialize him:this.mScreenOrientatio Neventlistener = new Orientationeventlistener (mactivity) {@Override public void Onorientationchange d (int i) {//I's range is 0~359///screen left at the top of the time I = 90; The top of the screen at the bottom of t
First supported the interface orientations option in the plist file leaves only one portraitThe screen forces a horizontal screen using the following codeSelf.navigationController.view.transform = Cgaffinetransformmakerotation (M_PI/2);Self.navigationController.view.frame = CGRectMake (0, 0, screen_width, screen_height);[[UIApplication sharedapplication] setstatusbarhidden:yes];Return to normal vertical dis
For example, if you want to force the software display to change the software interface as the device turns, you can use Android: screenorientation to force the software screen display direction.Note that the red part is modified.
Android: screenorientation = "Landscape" is used to determine the horizontal mode
For horizontal screen display, not vertical screen.Experienced you must know that when the user vertical screen open, the prompt said you want to turn the phone is a very silly x thing. At this time if the user does not turn on the phone in the horizontal screen mode, but also to force users to open. This is when users
Recently, the company is going to develop a mobile-type web game (that is, by hand, you'll find a girlfriend at the end of the page). =), requires horizontal screen display, not vertical screen.
Experienced you must know that when the user vertical screen open, the prompt said you want to turn the phone is a very silly x thing. At this time if the user does not t
Recently used video playback function: (Vitamio, note: In Build Setting inside the other Link Flag added-all_load)IOS 8 screen Rotation comparison pit, use the following code to force rotation-(BOOL) shouldautorotatetointerfaceorientation: (uiinterfaceorientation) interfaceorientation{return(interfaceorientation = = Uiinterfaceorientationlandscapeleft | | interfaceorientation = =uiinterfaceorientationlandsc
From Forum Nokia Wiki
Summary: This article describes how to force the use of a horizontal or vertical screen in the QT for Symbian program even when the phone's horizontal status is changed.
For Symbian phones with a horizontal sensor, when the user switches the phone from landscape mode (Landscape) to vertical screen mode (Portrait), the
{returnuiinterfaceorientationlandscaperight; }-(Nsuinteger) supportedinterfaceorientations{returnuiinterfaceorientationmasklandscaperight; }Of course,shouldautorotate is used to control auto-rotation, and you can set6. In addition, it is important to switch from a (vertical screen) to B (horizontal screen), can not use apushviewcontrollerb,Must use a Presentviewcontroller B. [Self.navigationcontroller pus
open, do not need to close when you can. What do not understand, you can join the top of the QQ group, inside asked me. -(BOOL) Shouldautorotate //Whether rotation is supported, if no, the method below will not be called, if yes, {if (!shouldautorot) { return NO; } else{ return YES;} } -(Nsuinteger) supportedinterfaceorientations{ return uiinterfaceorientationmaskallbutupsidedown;} Copyright NOTICE: This article for Bo Master original article, without Bo Master perm
Force horizontal screen on ios camera interface
By default, cameras in IOS call systems use portrait screens. Many methods are found online to force landscape screens to be invalid. The following code is tested to be compatible with ios78.
Customize a UIImagePickerController and overwrite the following methods:
-(UIInterfaceOrientation) preferredInterfaceOrienta
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.