我在视图中有几个按钮。这些在几天前进行了测试,并且工作正常。今天,由于某种原因,他们停止了工作。按钮是自定义的,带有图像。它们与以下动作相关联:
- (IBAction)walkTurnByTurn:(id)sender {
NSLog(@"Clicked Turn By Turn Walk");
CLLocationCoordinate2D destination = self.loadOficina.coordinate;
MKPlacemark *endLocation = [[MKPlacemark alloc] initWithCoordinate:destination addressDictionary:nil];
MKMapItem *endingItem = [[MKMapItem alloc] initWithPlacemark:endLocation];
[endingItem setName:self.loadOficina.title];
NSMutableDictionary *launchOptions = [[NSMutableDictionary alloc] init];
[launchOptions setObject:MKLaunchOptionsDirectionsModeWalking forKey:MKLaunchOptionsDirectionsModeKey];
[endingItem openInMapsWithLaunchOptions:launchOptions];
}
我删除了按钮并再次创建它,将其连接到操作。它已启用,用户交互也已启用。看起来它根本不响应触摸,因为单击时它不会改变颜色。任何想法可能发生了什么?