Je tente de créer une ondulation comme effet surune imageView quand il est touché, mais je ne comprends pas comment implémenter OpenGL pour Windows et le porter sur iOS. J'ai essayé d'utiliser http://www.codeproject.com/KB/openGL/dsaqua.aspx ainsi que cocos2d cependant, je trouve ce dernier complètement et complètement déroutant. Est-ce que quelqu'un serait prêt à faire des suggestions ou pourrait me diriger dans la bonne direction?
Merci beaucoup!
Réponses:
7 pour la réponse № 1Utilisez ci-dessous pour un effet d'entraînement sur iPhone
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:1.0];
[UIView setAnimationTransition:(UIViewAnimationTransition) 110 forView:view cache:NO];
[UIView commitAnimations];
Pour plus d'effets, vous pouvez vérifier ce lien:
http://www.iphonedevwiki.net/index.php?title=UIViewAnimationState
47 pour la réponse № 2
Si vous voulez un effet d'entraînement sur une vue, vous pouvez l'utiliser.
CATransition *animation = [CATransition animation];
[animation setDelegate:self];
[animation setDuration:2.0f];
[animation setTimingFunction:UIViewAnimationCurveEaseInOut];
[animation setType:@"rippleEffect" ];
[myView.layer addAnimation:animation forKey:NULL];
7 pour la réponse № 3
@Rony "s CATransition Ripple dans Swift
let animation = CATransition()
animation.delegate = self
animation.duration = 2
animation.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseInEaseOut)
animation.type = "rippleEffect"
myView.layer.addAnimation(animation, forKey: nil)
(Ceci est mon premier post, alors idk si je le fais bien: D)
2 pour la réponse № 4
Pour Swift 3.0
let animation = CATransition()
animation.delegate = self
animation.duration = 5.0
animation.timingFunction = CAMediaTimingFunction(name : kCAMediaTimingFunctionEaseInEaseOut)
animation.type = "rippleEffect"
viewForAnimation.layer.add(animation, forKey: nil)
1 pour la réponse № 5
J'ai essayé les codes mentionnés ci-dessus mais aucun ne fonctionne parfaitement. Découvrez le code source suivant. https://github.com/willstepp/gl_image_ripple