Hi,
I have a view in which I have few labels and I want to dynamically clear the view (remove all the labels) at certain condition in my application.
Please help me
Regards, Pratik
Hi,
I have a view in which I have few labels and I want to dynamically clear the view (remove all the labels) at certain condition in my application.
Please help me
Regards, Pratik
Your most logical option is to use a separate view for the next stage of your interface rather than changing them out, maybe using UIViewControllers.
If you really want to do this, though:
for (UIView *v in myView.subviews) {
// Include the if-statement if you want to remove UIControls only
if ([v isKindOfClass:[UIControl class]]) {
[v removeFromSuperview];
}
}