과의 없음 "클래스에 대한 가시적 @ 인터페이스가 선택 방법를 선언하지"를 선언하지 그들은이 오류가 실제로 무엇을 의미하는지에 대해 많은 것을 밝힙니다. 나는 바보 같은 실수라면 미안하다.는 '있는 NSString'에 대한 눈에 띄는 @interface 셀렉터 'performStringGeocode'가
이 오류의 의미에 대한 설명을 찾고 있는데, 코드에서 오류를 해결하는 방법에 대한 일부 수정 사항을 찾고 있습니다. 하!
오류 : '있는 NSString'에 대한 눈에 띄는 @interface 셀렉터 'performStringGeocode'
//MapViewController.h
#import <UIKit/UIKit.h>
#import <MapKit/MapKit.h>
@interface MapViewController : UIViewController <MKMapViewDelegate>
@property (nonatomic) NSString *fromAddr;
@end
를 선언합니다. NSString
의 눈에 보이는 인터페이스는 선택 performSTringGeocode
를 선언하지 않기 때문에
//MapViewController.m
@interface MapViewController()
@end
@implementation MapViewController
@synthesize fromAddr;
- (void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated];
if (self.isAddrPresent)
[self.fromAddr performStringGeocode]; //<-- Angry error on this line
}
- (void)performStringGeocode:(NSString*) addr{
//geocode stuff
}
클래스의 인터페이스 (.h 파일) (이 경우 NSString)에는 performStringGeocode라는 메서드가 없다는 것을 의미합니다. – rdelmar