我想在iPad上创建一个应用程序。喜欢iTunes中的“Showyou”
为此我需要在用户触摸视频thumnail图像时设置视图的成长效果,并在用户触摸视图外部时使用动画隐藏,就像在ipad中使用popover一样。
答案 0 :(得分:0)
我没有使用过ShowYou应用程序,但似乎需要一个动画来增大/缩小视图并可能移动它。如果是这样的话,试试这个
// to make it grow in this case 1.5 and move it to a into position in this case 100, 100
[UIView animateWithDuration:_animationDuration
animations:^{
CGAffineTransform transform = CGAffineTransformMakeScale(1.5f, 1.5f);
testView.transform = CGAffineTransformTranslate(transform, 100.0f, 100.0f);
}
];
// make it go back
[UIView animateWithDuration:_animationDuration
animations:^{
someView.transform = CGAffineTransformIdentity;
}
];
您可能希望使用animateWithDuration:delay:options:animations:completion:这样您就可以在动画完成后添加代码来执行某些操作。希望这就是你要找的东西。 :)