MPMusicPlayerController queue index?
MPMusicPlayerController queue index?
- Subject: MPMusicPlayerController queue index?
- From: "Eric E. Dolecki" <email@hidden>
- Date: Mon, 4 Oct 2010 14:48:49 -0400
I have buttons that track back / next track. I am displaying the Now Playing
artwork for the song in a UIScrollView. There is a static UILabel below that
control.
When one uses a button, is there a queue index in the MPMusicPlayer I can
query or some technique other than handling that all myself with my own
defined index, etc?
- (IBAction)nextTrack:(id)sender {
//TODO: Are there items? If so, move the UIScrollView & update the
UITableView.
[myPlayer skipToNextItem];
//Move the UIScrollView into position to match...
//int pt = 240 * *(THE INDEX IN THE QUEUE - easy to access?)*
//CGPoint offset = CGPointMake(pt, 0);
//[NowPlayingScrollView setContentOffset:offset animated:YES];
MPMediaItem *currentItem = myPlayer.nowPlayingItem;
NSString *tmp = [NSString stringWithFormat:@"%@",[currentItem
valueForProperty:MPMediaItemPropertyTitle]];
songTitleLabel.text = tmp;
}
Google Voice: (508) 656-0622
Twitter: eric_dolecki XBoxLive: edolecki PSN: eric_dolecki
http://blog.ericd.net
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden