这是我的代码:
- (voID)vIEwDIDLoad{ [self fadeAnimation:@"fadeAnimation" finished:YES target:lblReady]; [self fadeAnimation:@"fadeAnimation" finished:YES target:lblSet]; [self fadeAnimation:@"fadeAnimation" finished:YES target:lblGo];}- (voID)fadeAnimation:(Nsstring *)animationID finished:(BOol)finished target:(UIVIEw *)target{ [UIVIEw beginAnimations:nil context:nil]; [UIVIEw beginAnimations:animationID context:(__brIDge voID *)(target)]; [UIVIEw setAnimationDuration:2]; [target setAlpha:0.0f]; [UIVIEw setAnimationDelegate:self]; [UIVIEw commitAnimations];}解决方法 使用最新的UIVIEw动画方法会更容易:
[UIVIEw animateWithDuration:2.0 animations:^ { lblReady.Alpha = 0;} completion:^(BOol finished) { [UIVIEw animateWithDuration:2.0 animations:^ { lblSet.Alpha = 0; } completion:^(BOol finished) { [UIVIEw animateWithDuration:2.0 animations:^ { lblGo.Alpha = 0; } completion:^(BOol finished) { // Add your final post-animation code here }]; }];}];总结
以上是内存溢出为你收集整理的ios – 如何链接淡入淡出动画全部内容,希望文章能够帮你解决ios – 如何链接淡入淡出动画所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)