그래서 MKMapView
을 사용하는 Objective-C 라이브러리를 사용하고 있습니다. 그래서 클래스가 :Objective-C 프로토콜의 Swift Extensions
@interface BSWeatherMapView : MKMapView
/** The receiver’s delegate. */
@property (nonatomic, weak) id<BSWeatherMapViewDelegate> delegate;
:
extension ViewController : BSWeatherMapViewDelegate {
func mapView(mapView: BSWeatherMapView!, viewForAnnotation annotation: AnyObject) -> MKAnnotationView! {}
}
내가 할 때 :
@protocol BSWeatherMapViewDelegate<MKMapViewDelegate>
@optional
- (MKAnnotationView *)mapView:(BSWeatherMapView *)mapView viewForAnnotation:(id<MKAnnotation >)annotation;
내 신속 클래스는 다음을 수행 확장명을 가진 다음 오류가 발생합니다. Objective-C 메서드 mapView:viewForAnnotation:
mapView(_:viewForAnnotation:)
이 선택적 요구 사항과 충돌합니다. 방법 mapView(_:viewForAnnotation:)
in 프로토콜 MKMapViewDelegate
나는 이것을 과거에 얻는 데 아무런 단서가 없다 ... 누구?
감사합니다,
이것은 객관적인 C에서 합법적입니다.이 문제를 해결할 방법이 있습니까? 우리의 원래 응용 프로그램은 Objective-C 였고이 모든 것이 정상적으로 작동했습니다. – Gamemaker945
그래서 내가 처리하려고 노력하는 것이고 다른 것은 무시 될 수 있다는 것을 말해 줄 수있는 방법이 있습니까? – Gamemaker945