如果我有嵌套的子视图,如果我调用 removefromsuperview,所有子视图都会被处理吗?
伪代码:
UIView *viewA = [[UIView alloc] initWithFrame:CGRectMake(0 , 0, 100, 100)];
[self.view addSubview:viewA];
UIView *viewB = [[UIView alloc] initWithFrame:CGRectMake(25 , 25, 50, 50)];
[viewA addSubview:viewB];
UIButton *buttonC = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[viewB addSubview:buttonC];
然后按下按钮C:
[viewA removeFromSuperView];
所有视图都从屏幕上删除,但它们是否正确删除?我需要手动删除所有视图吗?