我試圖使用此iOS - 成員引用是一個指針?
NSURL *soundURL = [[NSBundle mainBundle] URLForResource:@"error"
withExtension:@"aiff"];
AVAudioPlayer *avSound = [[AVAudioPlayer alloc]
initWithContentsOfURL:soundURL error:nil];
self.soundError = avSound;
我在最後一行接收一個錯誤說分配一個AVAudioPlayer到一個屬性:構件引用類型「結構objc_class *」是一個指針;也許你的意思是使用' - >'?
屬性聲明如下
@property (nonatomic, strong) AVAudioPlayer *soundError;
指針?我不明白。
感謝
'AVAudioPlayer * soundError;'< - 所以它是一個指針。 – 2012-10-04 09:54:45
avSound總是一個點,所以?這是什麼解決方案? – SpaceDog