I have an InterfaceController with a table view. I created a segue from a cell of the tableview to another InterfaceController. If the segue type is "Push" contextForSegueWithIdentifier gets called. If the type is "Modal" contextForSegueWithIdentifier does not get called.
Never mind. According to the documentation contextForSegueWithIdentifier only gets called on a Push Segue. I needed to use the
- (void)table:(WKInterfaceTable *)table didSelectRowAtIndex:(NSInteger)rowIndex
method of the tableview to call
-(void)presentControllerWithNames:(NSArray *)names contexts:(NSArray *)contexts
When using a table view, use this segue method to pass an object to your segue.
- (id)contextForSegueWithIdentifier:(NSString *)segueIdentifier inTable:(WKInterfaceTable *)table rowIndex:(NSInteger)rowIndex {
return yourObject;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With