I have an interface with 2 buttons, both of them call the same interface but with different information. On the traditional interface I use prepareForSegue, but I don't know what's the equivalent one on the WatchKit.
相关问题
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- State preservation and restoration strategies with
- “Zero out” sensitive String data in Swift
- Get the NSRange for the visible text after scroll
相关文章
- 现在使用swift开发ios应用好还是swift?
- UITableView dragging distance with UIRefreshContro
- TCC __TCCAccessRequest_block_invoke
- Where does a host app handle NSExtensionContext#co
- Swift - hide pickerView after value selected
- How do you detect key up / key down events from a
- didBeginContact:(SKPhysicsContact *)contact not in
- Attempt to present UIAlertController on View Contr
For segue navigation in Watchkit there are two methods in WKInterfaceController:
and for tables
you can get the object you are passing in
func awakeWithContext(context: AnyObject?)
of the interface controller you are pushingYou can do this in two ways:
In your storyboard you set an identifier in your segue:
and then you can use
contextForSegueWithIdentifier
:Or you can pass information with a context via code, with:
This context is a dictionary and you have access to this dictionary in the
- (void)awakeWithContext:(id)context
In WatchKit, you can use this for calling WKInterfaceController: