Added remote control event handling to AppDelegate so that example app will show play icon in status bar

This commit is contained in:
Thong Nguyen 2014-01-29 22:30:52 +00:00
parent d5e531c602
commit b8528e30c5
1 changed files with 8 additions and 0 deletions

View File

@ -37,6 +37,9 @@
audioPlayerView.delegate = self;
audioPlayerView.audioPlayer = audioPlayer;
[[UIApplication sharedApplication] beginReceivingRemoteControlEvents];
[self becomeFirstResponder];
[self.window addSubview:audioPlayerView];
@ -45,6 +48,11 @@
return YES;
}
-(BOOL) canBecomeFirstResponder
{
return YES;
}
-(void) audioPlayerViewPlayFromHTTPSelected:(AudioPlayerView*)audioPlayerView
{
NSURL* url = [NSURL URLWithString:@"http://fs.bloom.fm/oss/audiosamples/sample.mp3"];