ios - remove view from super view from otherclass -
hi having 3 view controllers. a,b,c firstly adding b under c under b.in c view controller when c visible after click of button want remove c super view , b super view.for removing c b using following code
[self.view removefromsuperview];
i able remove c b on click of button. how can remove b from c viewcontroller class. after clicking of button in c view controller both b, c must remove & should visible.
thanks in advance.
uiview
has property superview
can call.
[self.view.superview removefromsuperview];
be sure read documentation: uiview.
edit: bear in mind view c subview of view b, code remove both c , b a.
Comments
Post a Comment