SmartTree
SmartTree

Reputation: 1471

Go back to AppDelegate

I am making a tab bar application. In AppDelegate in method -(void)applicationDidBecomeActive I have a string of code:

[self.window addSubview:pass.view];

So every time when app becomes active, pass.view appears. And when user makes all work in this view, I want to close this view and return to AppDelegate or any tab in the app. How do I return from pass.view ?

Upvotes: 0

Views: 252

Answers (1)

Oscar Gomez
Oscar Gomez

Reputation: 18488

Since all you are doing is laying an UIView in top of the window, all you have to do is remove it to go "back" you can use removeFromSuperview method to achieve this.

[pass.view removeFromSuperview];

Upvotes: 1

Related Questions