有没有一种方法可以检测表行是否已经被选中,现在我正在用布尔值来防止多次推送,如下所示:
- (void)willActivate {
// This method is called when watch view controller is about to be visible to user
pushed=NO;
}
- (void)table:(WKInterfaceTable *)table didSelectRowAtIndex:(NSInteger)rowIndex {
// if pushed, just return else continue and set pushed to true
if (pushed) {
return;
}
pushed=YES;
[self pushControllerWithName:rowData[@"controllerIdentifier"] context:nil];
}发布于 2015-05-22 03:58:18
没有内置的方法来检测WKInterfaceTable中的多个触摸。您正在使用的技术与我在我的Watch应用程序中使用的技术相同。在我的例子中,我为每一行维护一个BOOL,表明它是否被启用。基于该BOOL,我更新了我的单元,使其显示为" disabled "-looking状态,当然,从技术上讲,它并不是禁用的。
https://stackoverflow.com/questions/30381325
复制相似问题