• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
MPMusicPlayerController queue index?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread 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

  • Prev by Date: Re: clear a CGContextRef in an iPhone app
  • Next by Date: NSTextView Line Endings
  • Previous by thread: Re: clear a CGContextRef in an iPhone app
  • Next by thread: NSTextView Line Endings
  • Index(es):
    • Date
    • Thread