문제

I thought I was doing something relatively simple, but I guess not.

Running:

NSLog(@"%f",[[UIScreen mainScreen] scale];

returns 0.000000

The problem is that I am trying to check for a retina display and the:

if([UIScreen respondsToSelector:@selector(scale)] &&
   [[UIScreen mainScreen] scale] == 2.0) {
    // does not get called on an iPhone 4
}

Doesnt get called. I have tried this both in the simulator as well as on the device.

도움이 되었습니까?
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top