4inch screen or 3.5

Send Snippet To: Save this snippet to Code Collector Pro -- view all balzan's snippets
language: Objective-C
license: Other

Code for Snippet:

                
if(UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)
	{
		CGSize result = [[UIScreen mainScreen] bounds].size;
		if(result.height == 480){
			// 3.5 inch
			self.chartHeight = 367;
		}
		else if(result.height == 568){
			// 4 inch
			self.chartHeight = 455;
		}
	}
 
 
 
 
-(BOOL) isTall{
    return ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) && ([[UIScreen mainScreen] bounds].size.height * [[UIScreen mainScreen] scale] >= 1136);
}
comments powered by Disqus

Info

Link to this snippet:


Download to Code Collector

To use the direct link to your snippet on CodeCollector.net either copy the html from the above section or drag the Download to Code Collector to where you would like to use it.

More Info:

Times Viewed: 316
Date Added: 2012-09-25 07:01:28
Last Modified: 2014-02-18 20:29:31

Web Analytics