I currently pass a string value from one WKInterfaceController
to another using contextForSegueWithIdentifier
like so:
override func contextForSegueWithIdentifier(segueIdentifier: String, inTable table: WKInterfaceTable, rowIndex: Int) -> AnyObject? {
if segueIdentifier == "segueDetails" {
return self.string1
}
// Return data to be accessed in ResultsController
return nil
}
And then on the destination WKInterfaceController
I do the following:
override func awakeWithContext(context: AnyObject?) {
super.awakeWithContext(context)
if let val: String = context as? String {
self.label.setText(val)
} else {
self.label.setText("")
}
// Configure interface objects here.
}
However I want to pass multiple values, using two additional properties with string values called string2
and string3
.
How can I pass additional string values to the WKInterfaceController
?