Claudia Mardegan
Claudia Mardegan

Reputation: 567

how to use performSegueWithIdentifier in apple Watch?

I always used the feature [self performSegueWithIdentifier:@"changeView" sender:self];

someone can say how this works for apple watch?

Upvotes: 0

Views: 1218

Answers (2)

Marián Černý
Marián Černý

Reputation: 15748

If you are using a table, you can use table.performSegue(forRow: 0) in watchOS 3. Otherwise, you have to use pushControllerWithName:context: or presentControllerWithName:context:.

Upvotes: 0

alph0x
alph0x

Reputation: 21

WKInterfaceController shows you how to use segues with identifiers (contextForSegueWithIdentifier:) but i think the best use is "presentControllerWithName:context:" and "pushControllerWithName:context:", you can assign a name for the View from the Interface Builder; when you try to create a segue from the controller to the desire view, normally it creates a page, you need to create a button for that action, using the methods i've told you before, you don't need to create the segues on IB, just identify the views and that's it.

Upvotes: 1

Related Questions