He leído y probar este article (Opening door effect using Core Animation)¿Cómo rotar un UIImageView con CATransform3DRotate hace un efecto como la apertura de la puerta?
Y Implementar siguiente código en mi aplicación:
CALayer *layer = threeHomeView.layer;
CATransform3D initialTransform = threeHomeView.layer.transform;
initialTransform.m34 = 1.0/-900;
[UIView beginAnimations:@"Scale" context:nil];
[UIView setAnimationDuration:3];
layer.transform = initialTransform;
CATransform3D rotationAndPerspectiveTransform = threeHomeView.layer.transform;
rotationAndPerspectiveTransform = CATransform3DRotate(rotationAndPerspectiveTransform
, 40.0f * M_PI/180.0f
, 0.0f
, 1.0f
, 0.0f);
layer.transform = rotationAndPerspectiveTransform;
[UIView setAnimationDelegate:self];
[UIView setAnimationDidStopSelector:@selector(threeHomeFlyOut)];
[UIView commitAnimations];
threeHomeView es un UIImageView.
MI PREGUNTA ES: la imagen solo puede rotar en la línea vertical media de la imagen, pero quiero que gire en la línea vertical izquierda de la imagen.
estoy teniendo el mismo problema y tratar de establecer un tutorial adecuado/explicación más a fondo aquí: http: // stackoverflow.com/questions/7685547/3d-door-open-animation-between-two-uiviewcontrollers –