我正在设计一个应用程序,需要一个带有左上角X(十字)按钮的视图,每件事情都很好我想删除视图,当X按钮点击时整个视图将从X按钮消失,因为相机中的快照他们删除时滚动 我是iphone开发的新手,请通过教程或代码的链接告诉我 提前致谢
答案 0 :(得分:1)
CGPoint myExitIconCenter = myExitIcon.center;
CGRect endRect = CGRectMake(myExitIconCenter.x, myExitIconCenter.y, 0, 0);
[UIView animateWithDuration:0.3 animation:^{
meViewBeingClosed.frame = endRect;
} completion: ^(BOOL finished) {
[meViewBeingClosed removeFromSuperview];
}];