Monkey original, welcome reprint. Reproduced please specify: Reproduced from COCOS2DER-CSDN, thank you!Original address: http://blog.csdn.net/cocos2der/article/details/44133127When running a scene today, the welcome scene can be rotated, entering the main scene and discovering that it will crash as soon as you rotate the phone screen.to‘NSInternalInconsistencyException‘,‘UnityDefaultViewController should be used ifissetto autorotate‘The error message has been shown to be caused by using auto rot
code as follows:
@Override
public void onconfigurationchanged (Configuration newconfig) {
Super.onconfigurationchanged (Newconfig);
Checks the orientation of the screen
if (newconfig.orientation = = Configuration.orientation_landscape) {
Toast.maketext (This, "Horizontal screen mode", Toast.length_short). Show ();
else if (newconfig.orientation = = configuration.orientation_portrai
Hewlett-Packard has launched touchsmart tx2 rotating touch screen notebook. In early January, the company showed touchsmart TM2 in the CES International Consumer Electronics exhibition, foreign media have recently brought us out-of-the-box videos for this notebook.
Touchsmart series notebook rotating design allows users to change from a notebook to a touch
Orientation Auto Rotation rotating screen crash (14 of Unity3D development), orientationunity3d
Monkey original, reprinted. Reprinted Please note: Reprinted from the Cocos2Der-CSDN, thank you!
Address: http://blog.csdn.net/cocos2der/article/details/44133127
When we run a scenario today, the welcome scenario can be rotated. When we enter the main scenario, we find that as long as the mobile phone
Rotating Screen Control and iOS6 skills for ios6
In iOS5.1 and earlier versions, we usually useShouldAutorotateToInterfaceOrientation:To independently control the orientation of a UIViewController, such:
-(BOOL) shouldAutorotateToInterfaceOrientation :( UIInterfaceOrientation) interfaceOrientation
{
Return (interfaceOrientation = UIInterfaceOrientationPortrait );
}
However, in iOS6, this method i
Rotating Screen Control Technique of ios6
In ios5.1 and earlier versions, we usually useShouldautorotatetointerfaceorientation:To independently control the orientation of a uiviewcontroller, such:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation{ return (interfaceOrientation == UIInterfaceOrientationPortrait);}
However, in ios6, this method is discarded and
(newConfig. orientation = Configuration. ORIENTATION_LANDSCAPE ){Toast. makeText (this, "Landscape mode", Toast. LENGTH_SHORT). show ();} Else if (newConfig. orientation = Configuration. ORIENTATION_PORTRAIT ){Toast. makeText (this, "portrait mode", Toast. LENGTH_SHORT). show ();}}
We do not recommend using this method to handle Configuration changes in the official Android development documentation:Note: Using this attribute shocould be avoided and used only as a last-resort. Please read Handl
Cocos2dx 2.x Android gravity detection rotating screen, cocos2dx android
In the case of charging, when playing with a mobile phone, the screen usually needs a specific rotation direction.
The function is divided into two parts: one is to obtain the desired Angle Based on the mobile phone's gravity direction X, Y, and Z; the other is to set the
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.