0

I´m trying to navigate to different screens with WatchOS but when i choose this action in a button:

[self presentControllerWithName:@"Screen2" context:contextDic];

The Screen2 open correctly but inside this screen i have a button with this action:

[self pushControllerWithName:@"Screen1" context:context];

And this button doesn´t work and i can´t go to the Screen1. How i can push the button of this Screen2 and itself close and go back to the Screen1? I have use presentControllerWithName at this screen2 but i don´t want at top the previous button.

user3777879
  • 41
  • 1
  • 10

1 Answers1

0

You should use the method popController to go back to a previous interface controller.

After pushing an interface controller onto the screen, use this method to remove it and display the previous interface controller again. The system animates the transition back to the previous interface controller asynchronously.

Note: This method is only available in watchOS 2.0.

See more in the WKInterfaceController class reference.

Jeff Lewis
  • 2,846
  • 1
  • 19
  • 24