我创建一个GLKViewController
这样的:
// Create a GLK View Controller to handle animation timings
_glkVC = [[GLKViewController alloc] initWithNibName:nil bundle:nil];
_glkVC.preferredFramesPerSecond = 60;
_glkVC.view = self.glkView;
_glkVC.delegate = self;
_glkVC.paused = YES;
NSLog(@"initial state: %@", _glkVC.paused ? @"paused" : @"running");
但它立即开始调用委托更新方法,NSLog
上面的输出是:initial state: running
我正在管理我的视图更新,setNeedsDisplay
但我希望GLKViewController
不时处理动画,所以我只想在需要时取消暂停它。有没有办法在暂停状态下启动控制器?