hey if anyone wants to help i'd really appreciate it. So i got this beautiful song that starts playing on the viewDidLoad method. now i just need to to play over and over and over again.... thanks.. here's the code:
h. file:
@implementation....... {
NSString *playerPath;
AVAudioPlayer *player;
}
@propoperty (nonatomic, retain) NSString *playerPath;
@propoperty (nonatomic, retain) AVAudioPlayer *player;
@end
m. file:
-(void)viewDidLoad {
playerPath = [[NSBundle mainBundle] pathForResource
"Vengeance" ofType
"mp3"];
player = [[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath
layerPath] error:NULL];
[player play];
}
h. file:
@implementation....... {
NSString *playerPath;
AVAudioPlayer *player;
}
@propoperty (nonatomic, retain) NSString *playerPath;
@propoperty (nonatomic, retain) AVAudioPlayer *player;
@end
m. file:
-(void)viewDidLoad {
playerPath = [[NSBundle mainBundle] pathForResource
player = [[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath
[player play];
}