go back to main view
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)
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 :)
精彩评论