Je suis conscient du fait que Core Animation distribue ses animations dans un thread séparé, comme indiqué dans la documentation. Néanmoins, mes animations semblent bloquer mon fil principal. Toutes les animations commencent et finissent. (Avec ou sans kCATransactionDisableActions défini comme vrai.) Mais devenez nerveux et les arrêts de piste principaux.Comment empêcher Core Animation de bloquer mon thread principal?
Qu'est-ce que je fais mal?
exemple conceptuel:
[NSTimer scheduledTimerWithTimeInterval:0.0333 target:self selector:@selector(gameEngine) userInfo:nil repeats:YES];
- (void)gameEngine
{
[CATransaction begin];
[CATransaction setValue:(id)kCFBooleanTrue forKey:kCATransactionDisableActions];
myLayer.position = CGPointMake(newX, newY);
[CATransaction commit];
}
Pour l'anecdote: nous plongons dans OpenGL ES. – Kriem