作者热门文章
- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
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];行。
任何帮助都会很棒,谢谢
最佳答案
关于ios - Xcode 4.2 错误 : receiver type for instance message does not declare a method with selector,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9422357/
我是一名优秀的程序员,十分优秀!