I got this log on device flip in iPad. Everything works fine. How to stop this log?
<CAEAGLLayer: 0x630f3e0>: calling -display has no effect.
Code:
ViewController *viewCntrl = [[ViewController alloc] init];
viewCntrl.view = gEAGLView;
[the_Window addSubview:viewCntrl.view];
@interface ViewController : UIViewController {
}
@implementation ViewController
-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
if(interfaceOrientation == UIDeviceOrientationL开发者_如何学PythonandscapeLeft || interfaceOrientation == UIDeviceOrientationLandscapeRight)
return YES;
else
return NO;
}
@end
Observed both in device and simulator.
This problem occurs from an openGL issue. Most likely you are animating a layer in openGL, you need to nest this whole layer inside another layer and animated that plain layer instead since it won't have any of the sensitive data as it's first child. However if you are using needsDisplayForKey:
in some method than a different solution may apply.
If this answer didn't work can you post the code of gEAGLView?
精彩评论