从不兼容的指针类型传递ObjectForKey的参数

时间:2011-01-04 21:57:40

标签: iphone objective-c ios4 compiler-warnings

嘿大家好! 当我构建这个时,我会在objectForKey上收到警告......警告说; “从不兼容的指针类型传递'objectForKey:'的参数1” 有谁知道如何解决这个问题?

- (void)reverseGeocoder:(MKReverseGeocoder *)geocoder didFindPlacemark:(MKPlacemark *)placemark{
    NSString *streetAddress = [NSString stringWithFormat:@"%@", 
                                 [placemark.addressDictionary objectForKey:kABPersonAddressStreetKey]]; 

                               mapView.userLocation.subtitle = streetAddress;
}
提前谢谢!

1 个答案:

答案 0 :(得分:2)

施放参数以杀死警告。

[placemark.addressDictionary objectForKey:(NSString *)kABPersonAddressStreetKey]