iOS Basics-resolution adaptation

Source: Internet
Author: User

(i) Resolution definition

resolution, which is the number of pixel points contained within a unit length, usually in pixels per inch (PPI). The units that describe the resolution are: (dpi dots per inch ), LPI (line per inch) and PPI (pixels per inch ).


(ii) IOS resolution

iOS devices, there are currently 3 main types (Apple TV, etc. not discussed here), divided into two categories by resolution

(1) Iphone/ipod Touch

Pu resolution 320 pixels x 480 pixels

Normal Retina resolution 640 pixels x 960 pixels  

iphone5 The screen resolution: 640 pixels x 1136 pixels

(2) IPad

Pu 768 pixels x 1024 pixels

Retina Screen (ipad3,new ipad,ipad Air, retina-screen IPad mini) 1536 pixels x 2048 pixels


actually design and development, it is true, Apple to prevent in the communication process (especially for the implementation of programming) Resolution of the confusion of thinking, Uniform use Point (points) describes the size of the interface element, for example:  
iphone/ipod Touch
interface description     320 points x 480 points (except iphone5)   320 points x 568 points (iphone5)  
ipad
interface description    768 point x 1024 points
conversion relationship  
Pu       1 points = 1 pixels  


(iii) iOS image processing

When the iOS system loads the picture, it automatically selects the picture based on whether the screen is a Retina screen, such as when the app automatically loads the @2x file suffix image on the retina screen, and the non-retina screen loads the normal picture.


(iv) Access to equipment information

Code authoring interface, some places can not hard code, need to set the position flexibly.

Get screen resolution [[UIScreen mainscreen] bounds]

Can be define for easy invocation in constant.h

#define Kscreensize [UIScreen mainscreen].bounds.size



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.