是我的UIViewController的结构,这是问题场景
用动画
打开名为“NewAddressView”(参考图像)的UIView- (IBAction)AddAddressAction:(id)sender {
[UIView animateWithDuration:0.5
delay:0.1
options: UIViewAnimationOptionCurveEaseOut
animations:^{
self.NewAddressView.frame = CGRectMake(0, 0, 320, 460);
}
completion:^(BOOL finished){
}];
}
- (IBAction)CloseAddAddress:(id)sender {
[UIView animateWithDuration:0.5
delay:0.1
options: UIViewAnimationOptionCurveEaseOut
animations:^{
self.NewAddressView.frame=CGRectMake(0,500,320,460);
}
completion:^(BOOL finished){
}];
}
此“NewAddressView”视图包含文本字段,如图所示。
在点击文本字段时,“NewAddressView”会自动隐藏,不会编写额外的代码来隐藏“NewAddressView”。
只是注意到视图没有隐藏它移动到其原始位置,即CGRectMake(0,500,320,460)。普通视图和文本字段没有其他功能。
请告诉我是否有任何必须添加的内容。
谢谢