开发者

Go back to main window once secondView is loaded

开发者 https://www.devze.com 2022-12-24 11:05 出处:网络
I have a Tableview on AppDelegate That calls a SecondView (dvController) when DidSelectRowAtIndexPath using:

I have a Tableview on AppDelegate That calls a SecondView (dvController) when DidSelectRowAtIndexPath using:

[self.window addSubview:[dvController view]];

On SecondView I defined a button linked to IBAction that should go back to previous view. It works great but when row selected but, How could then go back to previous view if main one is AppDelegate?

self.window addSubview:[?? view]];

Should be basic concept but I am quite开发者_运维知识库 new and unable to get the solution. Thanx :)


addSubview should be called when you want to add subview to the end of current view's subviews list. If you want get back to previous view, use [self.view removeFromSuperview]; instead. (Syntax may be wrong - no Mac somewhere near)

0

精彩评论

暂无评论...
验证码 换一张
取 消