#import <UIKit/UIKit.h>
#import <AVFoundation/AVFoundation.h>
@interface MainViewController : UIViewController<AVAudioPlayerDelegate>
@property(nonatomic,strong)AVAudioPlayer *movePlayer ;
@end
#import "MainViewController.h"
@interface MainViewController ()
@end
@implementation MainViewController
@synthesize movePlayer;
- (void)viewDidLoad {
// Do any additional setup after loading the view.
[super viewDidLoad];
NSString *filePath = [[NSBundle mainBundle] pathForResource:@"1111" ofType:@"mp3"];
NSURL *url = [NSURL fileURLWithPath:filePath];
movePlayer =[[AVAudioPlayer alloc] initWithContentsOfURL:url error:nil];
movePlayer.delegate=self;
[movePlayer prepareToPlay];
[movePlayer play];
}