上から下へのアニメーションの方向性を作りたいのですUIView
が、2日間試した後、降伏しました
これが私のコードです
- (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;
}];
}];
}
この方向....下から上へ...皆さんが私を助けてくれることを願っています:)