TapDetectingImageViewファイル内に新しいメソッドを作成しようとしていますが、.hファイルで宣言していても、メソッドが見つからないという警告が表示されます。
特定の3つの警告はすべて、ビルド時に.mファイルの@end行を指し、「クラス'TapDetectingImageView'の実装が不完全です;''-functionAのメソッド定義:'が見つかりません」; 「'-functionBのメソッド定義:'が見つかりません」
私は何が欠けていますか?TapDetectingImageViewのようなプロトコルファイルでこれを行うことは許可されていませんか?
私の.hファイルには次のようなものがあります。
@interface TapDetectingImageView : UIImageView <AVAudioPlayerDelegate> {
id <TapDetectingImageViewDelegate> delegate;
}
@property (nonatomic, assign) id <TapDetectingImageViewDelegate> delegate;
-(void) functionA:(NSString*)aVariable;
-(void) functionB:(NSString*)aVariable;
@end
私の.mファイルには次のようなものがあります。
-(void)functionA:(NSString*)aVariable {
// do stuff in this function with aVariable
}
-(void)functionB:(NSString*)aVariable {
// do stuff in this function with aVariable
}