[英]Why does method rowControllerAtIndex of WKInterfaceTable return nil?
When I run the code below, the method rowControllerAtIndex
of WKInterfaceTable
returns nil. 当我运行下面的代码时, rowControllerAtIndex
的方法WKInterfaceTable
返回nil。
[self.outletTable setNumberOfRows:numberOfCategoriesToShow withRowType:@"rowTypeLabel"];
RowControllerTypeLabel *theRow = [self.outletTable rowControllerAtIndex:rowInTable];
What I've checked: 我检查了什么:
RowControllerTypeLabel
. 我已经在故事板中的行与RowControllerTypeLabel
接口中的相应属性之间建立了连接。 Custom Class
of my label to my custom class RowControllerTypeLabel
. 我已将标签的Custom Class
字段设置为我的自定义类RowControllerTypeLabel
。 What am I missing? 我错过了什么?
I forgot to set the row controller's identifier rowTypeLabel
in the Attributes inspector. 我忘了在Attributes检查器中设置行控制器的标识符rowTypeLabel
。
I hope that this post will help others to find the problem in a shorter time than I needed. 我希望这篇文章能帮助其他人在比我需要的更短的时间内找到问题。
To solve you have to set the row controller's identifier in the Attributes Inspector: 要解决此问题,您必须在Attributes Inspector中设置行控制器的标识符:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.