getting the next and previous track if using iPodMusicPlayer
Im using an iPodMusicPlayer for my MPMusicController.
My question is once my appplication is launched and will continue what the iPod app is playing, can i retrieve the MPM开发者_StackOverflowediaItem of the next and previous track of the iPod music app? I cant seem to find a way to know if user chose albums, artists or songs as his/her choice on the iPod music app. If I can be able to know that, I can retrieve the list depending on the property and start from there..
.. or maybe i should just use applicationMusicPlayer?
thanks!
Dumping the view hierarchy does not reveal anything useful. Here is what I get even after letting the controller settle down and display the contents of all of the windows:
UIWindow:UIView:UIResponder:NSObject {{0, 0}, {320, 480}}
0: MPMediaPickerView:UIView:UIResponder:NSObject {{0, 20}, {320, 460}}
0: UIScrollView:UIView:UIResponder:NSObject {{0, 0}, {320, 460}}
0: UIImageView:UIView:UIResponder:NSObject {{0, 0}, {7, 7}}
1: UIImageView:UIView:UIResponder:NSObject {{0, 0}, {7, 7}}
UIWindow:UIView:UIResponder:NSObject {{0, 0}, {320, 460}}
This doesn't even make sense to me, there is no navigation bar or buttons. My conclusion is that Apple may be doing something to obscure the hierarchy which would make changing this nearly impossible.
The proper thing is to file a RADAR bug and request the feature. If enough people do that it may rise on someones priority list.
精彩评论