Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone){
- if ([[UIScreen mainScreen] respondsToSelector: @selector(scale)]) {
- CGSize result = [[UIScreen mainScreen] bounds].size;
- CGFloat scale = [UIScreen mainScreen].scale;
- result = CGSizeMake(result.width * scale, result.height * scale);
- if(result.height == 960) {
- NSLog(@"iPhone 4 Resolution");
- resolution_number = 1;
- }
- if(result.height == 1136) {
- NSLog(@"iPhone 5 Resolution");
- }
- }
- else{
- NSLog(@"Standard Resolution");
- }
- }
Add Comment
Please, Sign In to add comment