ARC错误:“接收器类型'FirstViewController'实例消息未声明带有选择器'updateWithEvent'的方法”
我知道这是因为ARC,在xcode 4.2中,但任何人都可以帮忙解决这个问题:
- (void)locationManager:(CLLocationManager *)manager didEnterRegion:(CLRegion *)region {
NSString *event = [NSString stringWithFormat:@"didEnterRegion %@ at %@", region.identifier, [NSDate date]];
[self updateWithEvent:event];
}
- (void)locationManager:(CLLocationManager *)manager didExitRegion:(CLRegion *)region {
NSString *event = [NSString stringWithFormat:@"didExitRegion %@ at %@", region.identifier, [NSDate date]];
[self updateWithEvent:event];
}
- (void)locationManager:(CLLocationManager *)manager monitoringDidFailForRegion:(CLRegion *)region withError:(NSError *)error {
NSString *event = [NSString stringWithFormat:@"monitoringDidFailForRegion %@: %@", region.identifier, error];
[self updateWithEvent:event];
}
每个[self updateWithEvent:event]都会发生错误;线。
任何帮助都会很棒,谢谢
答案 0 :(得分:1)