Tejas
Tejas

Reputation: 1048

How do I pop two/three views at once watchKit app?

I just started development in WatchKit. Suppose I have views appearing in sequence A-B-C-D-E. From view D, I want to land on view B or C (intermediate view). How it this achieved in a WatchKit app?

Upvotes: 1

Views: 151

Answers (1)

Tejas
Tejas

Reputation: 1048

After waiting for a long time, Still no answer. So, I am posting a work-around that I did in my app.

I made a use of flag. When you reach the D viewController set the flag to 'true' and implement the logic to pop C viewController (based on flag value) in C's willActivate method. Similar thing can be done in any number of previous view controllers that you want to pop (i.e B, A, etc.). Also, don't forget to reset the flag or your VC will automatically get popped everytime you go to that VC.

Upvotes: 1

Related Questions