Xcode, shortcuts to use in the simulator (update)

Source: Internet
Author: User
Tags touch
Xcode:

Cmd+b ——— Compilation Program

Cmd+r ——— Running the program

cmd+. ——— stop Running the program


cmd+ up ARROW ——— file header

Cmd+ down arrow ——— file tail cmd+ left mouse button ——— point in


cmd+/——— Comment Code

Cmd+a ——— Select All

Cmd+n ——— New File

Cmd+shift+n ——— New Xcode Project

Ctrl+i ——— Code formatting (auto indent)

ctrl+cmd+ ——— Switch header files and implementation files

cmd+[——— Left Indent

Cmd+] ——— Right Indent


Simulator:

Shift+cmd+h ——— back to the desktop


CMD+1/2/3 ——— Adjusting the emulator screen size

cmd+ direction ——— Adjusting the simulator


Cmd+h ——— Hidden Simulator

Cmd+q ——— Exit Simulator

Cmd+s ——— Simulator screenshot (the pictures are all on the desktop)


Screen capture:

Cmd+shift+3 ——— Full Screen screenshot (the pictures are all on the desktop)

Cmd+shift+4 ——— Area screenshot (the pictures are all on the desktop)


Size of screen:

iphone 4/4s Size: 3.5 inch actual point (size): 320*480 Resolution: 640*960

iphone 5/5s Size: 4.0 inch actual point: 320*568 resolution: 640*1136

Iphone6 Size: 4.7 Points of the actual screen: (375*667) Resolution: 750*1334

iphone Plus Size: 5.5 actual: (540*960) Resolution: 1080*1920


1. Resolution refers to the number of pixels per inch

No matter how big the screen gets, it can be frustrating if the image is blurry. Be mindful of the screen resolution (pixel density).
The images displayed on smartphones, tablets, or computers are actually made up of a number of small square dots with similar colors, which are the pixels we call. And the resolution of the screen refers to the number of pixels per inch, units are generally expressed in DPI and PPI. The higher the pixel, the richer the color palette, the more it can express the true sense of colour. In other words, the higher the pixels per inch, the clearer the image will be.
2.iPhone 5 resolution change with IPhone 6
Since the launch of the IPhone 6 series, its large screen features have attracted much attention. In particular, the IPhone6 Plus has a higher display than the original iphone series pixel.
The previous iPhone4, IPhone5, and newly released iPhone6, although screen sizes are different, but the resolution is 326ppi, while the newly released IPhone6 plus increases the screen size significantly while increasing the resolution to 401ppi.

The resolution of your IOS device:

Reference: http://blog.csdn.net/jiajiayouba/article/details/25554405

Iphone/ipod Touch

Normal screen 320 pixels x 480 pixels iPhone 1, 3G, 3gs,ipod touch 1, 2, 3

3:2 Retina Screen 640 pixels x 960 pixels iPhone 4, 4s,ipod touch 4

16:9 Retina Screen 640 pixels x 1136 pixels iPhone 5, 5s,ipod Touch 5 IPad
Normal screen 768 pixels x 1024 pixels Pad 1, Ipad2,ipad Mini
Retina screen 1536 pixels x 2048 pixels New Ipad,ipad 4

1: Only the resolution is not the same situation, the development of two kinds of resolution is available, the application of automatic recognition.
Before the IPhone 5 and IPod Touch 5 were out, for developers, the resolution was different because they were all 3.5-inch screens. Also, their resolution is exponentially related. Interface design only need to design a set, and then zoom in and out of equal proportions.

To facilitate developer development, the uniform point of Use in IOS describes the size of interface elements.
The conversion between dots and pixels is as follows:
Pu 1 points = 1 pixels
Retina Screen 1 dots = 2 pixels
The same is true for development on the IPad, which can only be developed according to 768 x 1136 points.

On the IPhone 5 and IPod Touch 5 on the machine, for the developer, its interface size is the x 568 points, you just based on this size to adjust your interface (if you need to adjust).
For example: I have a button, to be placed in the middle of the screen position, then the interface size of 480 points on the device, just set its center for (320/2, 480/2) position can, on the 3:2 Retina screen System This button can also be displayed correctly in the middle;
On a device with a screen size of 568 dots, you set its center to (320/2, 568/2).
The base resolution of the current screen can be obtained directly from [[UIScreen mainscreen] bounds], so do not use hard code.

2: Only the size of the case, the development of the total no impact.
A: You only need to focus on the resolution at development, ipad 2 is different from the ipad mini screen, but the resolution is the same, so there is no impact, the app on ipad 2 can run normally, on the ipad Mini.
1, now the latest factory equipment, paired with the latest operating system. Now, Iphone4 ios6.0 above already, and basically are retina Retina screen. Before 2,ios7, the status bar alone accounted for 20 points, that is, UIWindow frame is (0,0,320,568), Rootviewcontroller frame is (0,20,320,548). iOS7 and 7.1, the status bar no longer alone accounted for 20 points, that is, UIWindow frame is (0,0,320,568), Rootviewcontroller frame is (0,0,320,568).
Summary: iphone4,iphone4s is 3.5 inches, retina screen, screen resolution of 640*960 pixels, screen layout according to 320*480 point to Layout, iphone5,5s are 4 inches, retina screen, screen resolution of 640*1136 pixels , the screen layout is laid out according to the 320*568 point. As you've determined, the next thing to consider is the iOS system version, because the iOS7 navigation bar (44 points) and the status bar (20 points) no longer occupy a single height, so the page automatically stretches to 568 points. That is, the (0,0) origin of the page is in the upper-left corner of the screen. You can ios7 the following, the navigation bar (44 points) and the status bar (20 points) alone occupy the height, that is, the page (0,0) origin is actually starting from below the navigation bar, that is, the entire screen (0,20) started.
IPhone6 plus the relationship between the resolution of the footage and the actual resolution IPhone6 plus uses footage @3x with 3 times magnification, and the UI should be designed to 2208 x 1242. IPhone6 Plus is scaled down by about 0.86 (1/1.15) in actual presentation.

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.