0
ViewController1.h獲取從另一個類訪問創建類對象
@interface ViewController : UIViewController
@property AVAudioPlayer *audioPlayer;
@end
ViewController1.m
@synthesize audioPlayer;
...
audioPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:path] error:NULL];
[audioPlayer play];
我怎樣才能阻止類ViewController2方法的音樂嗎?
工作就像一個魅力!你是最棒的。 – user1561346 2012-07-29 18:48:52
@ user1561346沒問題!很高興幫助! – sridvijay 2012-07-29 18:50:04