I am trying to assign a AVAudioPlayer to a property using this
NSURL *soundURL = [[NSBundle mainBundle] URLForResource:@"error"
withExtension:@"aiff"];
AVAudioPlayer *avSound = [[AVAudioPlayer alloc]
initWithContentsOfURL:soundURL error:nil];
self.soundError = avSound;
I am receiving an error on the last line saying: member reference type 'struct objc_class *' is a pointer; maybe you meant use '->' ?
the property is declared like
@property (nonatomic, strong) AVAudioPlayer *soundError;
pointer? I don't get it.
thanks
You did not post your full method but the error may indicate that you're trying to assign property in the class method, not in an instance method.
Check if your method declaration is correct - probably it should be
- (void) someMethod
instead of
+ (void) someMethod
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With