[UIVIEw beginAnimations:nil context:NulL];[UIVIEw setAnimationDuration:1];[UIVIEw setAnimationTransition:uiviewanimationtransitionFlipFromleft forVIEw:imgVIEw cache:YES]; imgVIEw.image = img2;[UIVIEw commitAnimations];
但是在iOS 4.0及更高版本中不鼓励使用此方法,我应该使用TransitionWithVIEw:duration:options:animations:completion:
我不能让它正常工作.有人可以帮我吗
谢谢!
[UIVIEw TransitionWithVIEw:imgVIEw // use the forVIEw: argument duration:1 // use the setAnimationDuration: argument options:UIVIEwAnimationoptionTransitionFlipFromleft // check UIVIEwAnimationoptions for what options you can use animations:^{ // put the animation block here imgVIEw.image = img2; } completion:NulL]; // nothing to do after animation ends.总结
以上是内存溢出为你收集整理的ios4 – iOS 4.2:使用块动画翻转图像全部内容,希望文章能够帮你解决ios4 – iOS 4.2:使用块动画翻转图像所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)