Ios Xcode 4.2错误:实例消息的接收器类型未声明带有选择器的方法
ARC错误:“实例消息的接收器类型“FirstViewController”未声明带有选择器“UpdateWitheEvent”的方法” 我知道这是因为xcode 4.2中的ARC,但有人能帮助解决这个问题吗:Ios Xcode 4.2错误:实例消息的接收器类型未声明带有选择器的方法,ios,xcode4.2,automatic-ref-counting,Ios,Xcode4.2,Automatic Ref Counting,ARC错误:“实例消息的接收器类型“FirstViewController”未声明带有选择器“UpdateWitheEvent”的方法” 我知道这是因为xcode 4.2中的ARC,但有人能帮助解决这个问题吗: - (void)locationManager:(CLLocationManager *)manager didEnterRegion:(CLRegion *)region { NSString *event = [NSString stringWithFormat:@
- (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,不管它是什么。在这种情况下,self是什么?它应该实现updateWitheEvent吗?我认为这与ARC没有任何关系。正如其他人所说,您只是缺少了一个方法声明。