我在FirstViewController中有这样一段代码
{
SecondViewController *objComing=[[SecondViewController alloc] init];
[self.view addSubview:objComing.view];
objComing.view.backgroundColor=[UIColor blueColor];
objComing.view.frame=CGRectMake(0,420, 320, 0);
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:0.5];
[UIView setAnimationCurve:UIViewAnimationCurveEaseIn];
objComing.view.frame=CGRectMake(0,0, 320, 420);
[UIView commitAnimations];
}SecoundViewController包含关闭/关闭按钮。如果要取消/删除和隐藏此覆盖层,IBAction连接到按钮(包含在SecoundViewController中)应如何显示?
发布于 2012-04-23 01:10:39
在Close/dismiss按钮方法中,添加以下行以删除第二个视图控制器子视图:
[self.view removeFromSuperview];发布于 2012-04-23 01:12:11
self.view removeFromSuperview;
https://stackoverflow.com/questions/10270074
复制相似问题