sebyddd/SDVersion

on Simulator its getting problems

Closed this issue · 7 comments

on xcode 6.0.1 versions simulator i am not able to detect iPhone6 / iPhone6 Plus by device size. can you please check once?

Hi!

Can you please post an example of how you tried to detect the device screen size ?

Thank you!

Hi Yes sure.. Please check below code to detect different screen on the simulator.

if ([SDiPhoneVersion deviceSize] == iPhone35inch) {
NSLog(@"Your screen is 3.5 inches");
} else if ([SDiPhoneVersion deviceSize] == iPhone4inch) {
NSLog(@"Your screen size is 4 inches");
resolutionPixel = @"640x1136";
} else if([SDiPhoneVersion deviceSize] == iPhone47inch) {
NSLog(@"Your screen size is 4.7 inches");
resolutionPixel = @"750x1334";
} else if([SDiPhoneVersion deviceSize] == iPhone55inch) {
NSLog(@"Your screen size is 5.5 inches");
resolutionPixel = @"1080x1920";
}

from the above code, i am not able to detect any kind of simulator screen.

Thanks you,

Sorry, i don't see any problems. If you run the code above in the iPhone 6 Simulator, it will NSLog: "Your screen size is 4.7 inches". What is the problem ?

It seem bug of compiler.
bug_demo

Sorry I got this problem because my project don't support for IP6 & IP6+

I am glad you found that out. Thanks for pointing it out! 😄

It's not a bug. After I add Launch screen support IP 6 & IP6+, this problem disappeared !
Thank for your contributing SDiPhoneVersion :)