Hello
I have a main view and I add another view with add subview. Then I add and 3rd view with add subview. Now I want to go back on the main view. How will I do that?
(I cant use addsubview:view or _view)
Hello I have a main view and I add another view with add subview.
Share
I’m not exactely sure what you mean by “going back” to the mainview, but you can send messages to your superview via delegation. Just set a delegate in your subview and set it to self upon adding it as a subview and releasing it.
If by “going back” you mean removing all subviews, then just call -removeFromSuperview from every subview and you should be fine 🙂