3
我添加了一个视图,这样我的UIViewController子视图:UIViewController中删除子视图
// into my ViewController:
UIImageView *imView =[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"img.jpg"]];
imView.frame = CGRectMake(2, 46, 1020, 720);
[self.view addSubview:imView];
现在,另一个按钮,我想从子视图链中删除imView .. 我该怎么做才能做到这一点? ? 感谢
的感谢!我试过,但uimage视图仍然在视图控制器... 我看着你的链接,并写道'显示时从不调用此方法。'... 但我需要删除时显示... – ghiboz 2010-06-12 14:00:44
是你确定是“什么时候显示”而不是“什么时候显示”?你可以看看这个问题,它可以回答你的问题: http://stackoverflow.com/questions/1144496/how-to-correctly-removefromsuperview – vodkhang 2010-06-12 14:05:08
谢谢!我会尽力! – ghiboz 2010-06-12 14:38:24