NSTimer
を使用して、クラスのスーパークラスの関数を呼び出そうとしています。
この関数は、次のように呼び出すと機能します。
[super playNarrationForPage:[NSNumber numberWithInt:1]];
しかし、私がこれを行う場合:
NSTimer *narrationTimer = [NSTimer scheduledTimerWithTimeInterval:7.5
target:self.superclass
selector:@selector(playNarrationForPage:)
userInfo:[NSNumber numberWithInt:1]
repeats:NO
];
このエラーが発生します:unrecognized selector sent to class 0x106890
2012-07-06 21:14:59.522 MyApp[19955:707] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[MyBaseClass playNarrationForPage:]: unrecognized selector sent to class 0x106890'
super
として設定してみましたtarget:
が、「未申告の識別子スーパーの使用」と言われました。何かご意見は?