사용자 지정 대리자 및 데이터 소스가 있습니다. 하지만 초기화 할 때 몇 가지 문제가 있습니다. 내 .h 파일에 이런 식으로.사용자 지정 대리자 및 데이터 소스에 문제가 발생했습니다.
@property (nonatomic, assign) id<UITableViewDelegate> delegate;
@property (nonatomic, assign) id<KalDataSource> dataSource;
결과적으로 .m 파일에서 합성 할 때 다음 오류가 발생합니다.
Existing ivar 'dataSource' for property 'dataSource' with assign attribute must be __unsafe_unretained.
일부 Google 검색 마법을 마친 후 필자는 이와 같은 변수를 사용해야한다고 판단했습니다.
@property (nonatomic, strong) id<UITableViewDelegate> delegate;
@property (nonatomic, strong) id<KalDataSource> dataSource;
하지만이 오류가 발생합니다.
linker command failed with exit code 1 (use -v to see invocation)
아무도 도와 줄 수 있습니까?
친절에 감사드립니다!
@dynamic을 사용할 때 여전히 링크 오류가 발생합니다. – Steaphann
@StefGeelen 전체 오류 메시지를 게시 할 수 있습니까? – NSAddict
중복 기호 _KalDataSourceChangedNotification에서 : /Users/geelenstef/Library/Developer/Xcode/DerivedData/Offitel-cpxhgfgbmhddbwbpmyjydsswuygz/Build/Intermediates/Offitel.build/Debug-iphonesimulator/Offitel.build/Objects-normal/i386/AgendaViewController.o /Users/geelenstef/Library/Developer/Xcode/DerivedData/Offitel-cpxhgfgbmhddbwbpmyjydsswuygz/Build/Intermediates/Offitel.build/Debug-iphonesimulator/Offitel.build/Objects-normal/i386/KalViewController.o 아키텍처에 대한 ld : 1 중복 심볼 i386 clang : 오류 : 종료 코드 1로 링커 명령이 실패했습니다 (호출을 보려면 -v 사용). – Steaphann