我想UIView
从上到下创建动画方向,但是尝试了两天后,我投降了
这是我的代码
- (IBAction)goAction:(id)sender
{
primaryView.userInteractionEnabled = NO;
[UIView animateWithDuration:0.3 animations:^{
secondaryView.frame = CGRectMake(0, 100, secondaryView.frame.size.width, secondaryView.frame.size.height);
CALayer *layer = primaryView.layer;
layer.zPosition = -4000;
CATransform3D rotationAndPerspectiveTransform = CATransform3DIdentity;
rotationAndPerspectiveTransform.m21 = 1.0 / -300;
layer.transform = CATransform3DRotate(rotationAndPerspectiveTransform, 10.0f * M_PI / 180.0f, 1.0f, 0.0f, 0.0f);
primaryShadeView.alpha = 0.35;
} completion:^(BOOL finished) {
[UIView animateWithDuration:0.3 animations:^{
primaryView.transform = CGAffineTransformMakeScale(0.9,0.9);
primaryShadeView.alpha = 0.5;
}];
}];
}
这个方向......从下到上......希望大家能帮助我:)