문제

Can we turn off retina display for iPad programmatically? I know it is possible in cocos2d by using

[[CCDirector sharedDirector] enableRetinaDisplay:NO];

But for cocos touch is it possible? If yes how?

도움이 되었습니까?

해결책

No,Its not possible. Cocos2d acts as a engine so its possible to turn off retina display.It creates its own virtual display and show it over the normal display. But in cocos touch we can not access the actual engine.So its not possible in cocos touch.

다른 팁

Not sure but you can't do this in iOS. But you can check it (retina/not) by using following code

Put this method

- (BOOL)isRetina
{
    if ([[UIScreen mainScreen] respondsToSelector:@selector(scale)] && [[UIScreen mainScreen] scale] == 2.0) {
        return YES;
    }
    return NO;
}

And write code for non retina screen.

if([self isRetina] == NO)
{
  // not retina display
}
else
{
   // retina display
}

Using above code you can perform your operation for not retina display OR retina display device.

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