ios - How to measure the pixels provided in iPhone UI -


currently working on iphone application. find difficulties in fixing ui layouts.

is there tool thats measures pixels given in application? ruler in microsoft word or photoshop around application allows me find measurements in app.

thanks

screen height , width macros:

#define screen_width ((([uiapplication sharedapplication].statusbarorientation == uiinterfaceorientationportrait) || ([uiapplication sharedapplication].statusbarorientation == uiinterfaceorientationportraitupsidedown)) ? [[uiscreen mainscreen] bounds].size.width : [[uiscreen mainscreen] bounds].size.height)  #define screen_height ((([uiapplication sharedapplication].statusbarorientation == uiinterfaceorientationportrait) || ([uiapplication sharedapplication].statusbarorientation == uiinterfaceorientationportraitupsidedown)) ? [[uiscreen mainscreen] bounds].size.height : [[uiscreen mainscreen] bounds].size.width) 

these macros give screen_height , screen_width whenever use them current iphone or ipad device

if want scale can check scale so:

[uiscreen mainscreen].scale; 

point coordinates multiplied screen scale = pixel size, iphone 6+ how work:

screen_width * 3 = pixel width screen_height * 3 = pixel height 

Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -