I'm pushing to another WKInterfaceController
when a row is selected but I can't seem to pass the rowIndex
as context for my new controller which I would like to do.
// Push to next controller and pass rowIndex as context
- (void)table:(WKInterfaceTable *)table didSelectRowAtIndex:(NSInteger)rowIndex {
[self pushControllerWithName:(NSString *)@"ZoomPokeController"
context:rowIndex];
}
此代码给出了错误
发送 NSInteger 的不兼容整数到指针转换:ARC 不允许将“NSInteger”(又名“int”)隐式转换为“id”。
我可以将 my 更改context
为 nil 并且构建成功,但当然我没有上下文。我已经查看了迄今为止对我有很大帮助的类文档以及关于 stackoverflow 的类似问题,但我不知道如何编写它。谢谢你的帮助。