Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Adjust UI as per screen size

$
0
0

Hi, I am working on an app which would be universal iOS app, am stuck at a place where i have to support multiple screen sizes and i am not sure how can i get the actual screen size in titanium.

I tried the below code but they give the same value for all the different simulators

Ti.API.info('ScreenHeight'+Titanium.Platform.displayCaps.platformHeight); Ti.API.info('screenWidth'+Titanium.Platform.displayCaps.platformWidth);

So can you tell me a calculation or some library which directly provides the screen width and height as in if i am running the app on simulator iPhone 6 plus it should provide me the screen size of 6 plus else if i am running on iPad Air it should provide me the screen size of iPad air.

Thanks


Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>