I'm trying to open a modal InterfaceController from a Menu in WatchOS 2. This works fine by calling the Controller in the following way:
@IBAction func doInfoMenuAction() {
self.presentControllerWithName("InfoInterfaceController", context: nil)
}
The InfoInterfaceController is completely "empty":
import Foundation
import WatchKit
class InfoInterfaceController: WKInterfaceController {
}
When I add a label to the InfoInterfaceController I get a strange behavior: After pressing the Menu Info-Item, the dialog appears but the label doesn't get painted. Instead the waiting spinning wheel is displayed in an endless loop.
The InfoInterfaceController looks in that case like:
import Foundation
import WatchKit
class InfoInterfaceController: WKInterfaceController {
@IBOutlet var serverUriLabel: WKInterfaceLabel!
}
The IBOutlet was created by CTRL-Linking the Label from the Storyboard to the InfoInterfaceController. If I delete the link and the IBOutlet, the InfoInterfaceController get's painted without a problem. Even the label is displayed fine.
Any idea what I'm doing wrong?