ユーザーに向かってくるように画像をアニメーション化する方法。例: 空を移動する
質問する
228 次
2 に答える
1
このソリューションをチェックしてください
-(IBAction)showSignInView:(id)sender{
signInView.hidden = NO;
[self initialDelayEnded:Your View ];
}
-(void)initialDelayEnded:(UIView *)view {
view.transform = CGAffineTransformScale(CGAffineTransformIdentity, 0.3, 0.3);
view.alpha = 1.0;
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:kTransitionDuration/1.5];
[UIView setAnimationDelegate:self];
[UIView setAnimationDidStopSelector:@selector(bounce1AnimationStopped:)];
view.transform = CGAffineTransformScale(CGAffineTransformIdentity, 1.1, 1.1);
[UIView commitAnimations];
}
- (void)bounce1AnimationStopped:(UIView *)view {
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:kTransitionDuration/2];
[UIView setAnimationDelegate:self];
[UIView setAnimationDidStopSelector:@selector(bounce2AnimationStopped:)];
view.transform = CGAffineTransformScale(CGAffineTransformIdentity, 1.0, 1.0);
[UIView commitAnimations];
}
- (void)bounce2AnimationStopped:(UIView *)view {
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:kTransitionDuration/2];
view.transform = CGAffineTransformIdentity;
[UIView commitAnimations];
}
于 2012-05-30T11:09:33.237 に答える
0
フェードインとフェードアウトを使用して画像をアニメーション化 -
- (IBAction)showHideView:(id)sender
{
// Fade out the view right away
[UIView animateWithDuration:1.0
delay: 0.0
options: UIViewAnimationOptionCurveEaseIn
animations:^{
imageView.alpha = 0.0;
}
completion:^(BOOL finished){
// Wait one second and then fade in the view
[UIView animateWithDuration:1.0
delay: 1.0
options:UIViewAnimationOptionCurveEaseOut
animations:^{
imageView.alpha = 1.0;
}
completion:nil];
}];
}
于 2012-05-30T10:58:08.797 に答える