开发者

What's wrong with my sub-classed AVAudioPlayer?

I sub-classed AVAudioPlayer like so:

#import <AVFoundation/AVFoundation.h>

@interface AudioPlayer : AVAudioPlayer {
    // irrelevant objects...
}
-(void) myMethod;
@end

I also placed myMethod in the implementation. In another class, I instantiate the sub-class (not AVAudioPlayer) and import the header.

When I attempt to call myMethod, I get the error:

[AVAudioPlayer myMethod]: unrecognized selector sent to instance

I'm certain I crea开发者_StackOverflow社区ted an AudioPlayer class, not AVAudioPlayer, so what gives?


:) easy to check the type of the object soon after its created. looks like the [audioplayer class] trick worked

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜