Unity3d game engine senses iOS device rotation and iPhone Keyboard Events
Original by Yu Song MomoArticleIf you reprint it, please note: Reprinted to my independent domain name blogYusong Momo program Research Institute, Original address: http://www.xuanyusong.com/archives/556
IPhone iPad itouch rotation
Apps on IOS iphone 4inch do not have full screen, black borders on the upper and lower sides, and iphone 4inch
I have been using the iPhone Retina (3.5-inch) simulator to test the IOS application. Everything is displayed normally, as shown in the following figure:
In application development, I use pure code for imple
The iPhone screen is 320*480, And the status bar height is 20 pixels. It mainly displays power, signal strength, and time.
Applications generally use three methods to rotate the screen:
1. automatically adjust attributes
Ii. Rebuilding the view during rotation
3. Switch between multiple views
1. Automatically Adjusti
APP size, remove the status bar
Cgrect r = [uiscreen mainscreen]. applicationframe;
This size will not change the width and height as the screen rotates, but after the screen rotates, the width and height will be automatically modified to lose the status bar height.
Portrait screen (4-inch): x = 0, y = 20, width = 320, Height = 548
Horizontal
rotation?
You have never used an Apple system! The screen can be locked in the ios system, both in the past and now. In the previous ios 6, you double-click the home Key and pull the bottom menu bar to the left to find the lock button, later, ios 7 is more convenient. You only need to slide up the screen to find the lock button. ios 8 is no different from ios 7
1. I am here the Apple 5s is using the iOS7.1.1 system, as shown in the following figure we click "Settings" as pictured.
2. Then we will see in the open interface that there is a touch ID and a password menu we click on it to enter.(If the iOS7 will be in the set "generic"-Touch ID and password OH)
3. Lock screen Password I will not introduce, mainly fingerprint password, as shown in the following fi
Navigator" and "Hide or show the Utilities" buttons on the toolbar to display the left Navigator area, Hide the Utility area, and select the "Hello_WorldViewController.m" file in the left Navigator area, find the "shouldAutorotateToInterfaceOrientation:" method and rewrite it. After rewriting, the Code is as follows:
-(BOOL) shouldAutorotateToInterfaceOrientation :( UIInterfaceOrientation) interfaceOrientation
{
// Return YES for supported orientations
Return YES;
}
Save the changes, run the p
controller A.2 Some suggestions when the screen spins• In the rotation process, the temporary interface operation response.• Rotate before and after, as far as possible the current display position unchanged.• For more complex view hierarchies, use screenshots to replace the current view level before the rotation starts, and then replace the original view level
"Automatic rotation of the iphone mobile screen setting method"
1, we will see in the Apple Mobile Desktop has a notification status bar, we use our fingers down to slide open the Notification center (if not this feature we need to open in the "settings" can OH)
2, click the arrow refers to the screen
directly under these two sets of graphs to cut down on it.If you need to adapt a different picture for 5 and 6 an [email protected] an [email protected] then need to determine the phone versionApple website image size requirements https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/MobileHIG/ ICONMATRIX.HTML#//APPLE_REF/DOC/UID/TP40006556-CH27-SW1//Related website Data http://justsee.iteye.com/blog/2118203/HTTP mp.weixin.qq.com/s?__biz=mjm5nzqymjeyoa==mid=200663740id
and content smaller (window default is 96DPI). At last we saw the words that the ants crawled. So Apple can increase the resolution by four times times, but the display text, the icon does not shrink or see, because the Apple uses the absolute value points point to define the element, the non-Retina screen 1 points represents 1 pixels, the retina, 1 points represents 4 pixels. Of course, the content displayed on the
It is very easy to add a startup image for ipadand iPhone apps. The basic idea is to add the startup image resource default.png. You only need to have different image sizes according to different resolutions and rotation directions.
Currently, iOS devices have four different resolutions:1 iPad 768x1024
2 new pad 1536x2048
3 iphone4 640x9604 iPhone 320x480
If a pr
For different Apple devices, see IOS: Model parameters, SDK, Xcode versions for each of the parameters.model ChangesCoordinates: Indicates the physical size of the screen, the coordinates become larger, indicating that the machine screen size has become larger;Pixels: Indicates the size of the screen picture, with a correspondence between coordinates, such as 1:1
The previous articles introduced a number of problems with the Unity3d engine itself, and today we are going back to the iOS device to discuss some touch screen gestures, the goal of this chapter is to achieve the model's rotation by touching the iphone screen gesture, and scaling the model.Let's think about the
The itouch, iPhone, and iPad settings all support rotation. If our programs can make different la s based on different directions, the experience will be better.
How can we set the program to support rotation? We usually set it in info. plist of the program.Supported interface orientations, Add the direction to be supported by our program, and each viewcontroller
IOS: screen rotation and transform
The itouch, iPhone, and iPad settings support rotation.ProgramYou can make different la s based on different directions, and the experience will be better.
How can we set the program to support rotation? We usually set it in info. plist of the program.Supported interface orient
Supports horizontal screen rotation for iOS devices
Ios devices support rotation methods:
1. Modify the info of the project. the value of "Supported interface orientations" in plist (generally, you can check the Taget-> General-> Deployment Info-> Device Orientation in the project to select Device Support ).
2. Implement the (application: supportedInterfaceOrient
Application:supportedinterfaceorientationsforwindow: method, Returns the Uiinterfaceorientationmaskallbutupsidedown value in this method. This way, even on the iphone6p or ipad screen launcher, the interface will not appear sideways, and on the iphone device video playback still support horizontal screen.To solve the above problems caused by speculation:By modifying the Info.plist to enable the device to s
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.