Question

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?

Was it helpful?

Solution

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.

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top