I am not familiar with transferring or passing data between two WKInterfaceController
in Apple Watch. What I am trying to do is , I have some variable like name
and age
in SecondInterfaceController
so I need to pass some value to them from WKInterfaceTable
when user tap a row . here is the code :
- (void)table:(WKInterfaceTable *)table didSelectRowAtIndex:(NSInteger)rowIndex {
NSString *name;
NSString *age;
switch (rowIndex) {
case 0:
name = @"Jack";
age = @"22";
break;
default:
break;
}
NSDictionary *d = [NSDictionary dictionaryWithObject:name forKey:@"kName"];
[self pushControllerWithName:@"SecondInterfaceController" context:d];
}
but I don't know how can I access to the dictionary from SecondIntefaceController and pass it to the _name (WKInterfaceLable) .