我有一个WatchKit应用程序,无法找到调用在我的table中设置InterfaceController的函数的最佳位置。

InterfaceController

   var receivedData = Array<Dictionary<String, String>>()

    var eventsListSO = Array<Event>()

    @IBOutlet var rowTable: WKInterfaceTable!

    func doTable() {

        eventsListSO = Event.eventsListFromValues(receivedData)
        rowTable.setNumberOfRows(eventsListSO.count, withRowType: "rows")

        for var i = 0; i < self.rowTable.numberOfRows; i++ {
            let row = rowTable.rowControllerAtIndex(i) as? TableRowController
            for eventm in eventsListSO {
                row!.mLabel.setText(eventm.eventMatch)
                NSLog("SetupTableM: %@", eventm.eventMatch)
            }
        }

    }


如果我的doTable代码看起来正确,并且在InterfaceController中该在哪里调用?

最佳答案

根据@KosukeOgawa,willActivate

关于ios - 调用WatchKit中的设置表,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/32951043/

10-09 20:48