2011-11-07 23 views

回答

1

將下面的代碼在您的視圖控制器:

CATransform3D t3d = CATransform3DIdentity; 
// m34 sets the amount of perspective 
t3d.m34 = 1.0/-1000.0; 

[UIView animateWithDuration:1.0 
         delay:0.0 
        options:UIViewAnimationCurveLinear 
       animations:^{ 
        self.view.layer.transform = CATransform3DRotate(t3d, M_PI, 0, 1, 0); 
       } 
       completion:^(BOOL finished) { 
        [UIView animateWithDuration:1.0 
              delay:0.0 
             options:UIViewAnimationCurveLinear 
             animations:^{ 
              self.view.layer.transform = CATransform3DRotate(t3d, 2*M_PI, 0, 1, 0); 
             } 
             completion:^(BOOL finished) { 
              self.view.layer.transform = CATransform3DIdentity; 
             }]; 
       }]; 

這是相當混亂,如果任何人對如何清除這件事,讓我知道什麼建議;)

+0

由於生病嘗試 – Eyal