问题
I am playing a audio file in iOS app using AVQueuePlayer/AVFoundation. i have set the MPNowPlayingInfoCenter's now playing information like album title, artist, Artwork, like this
NSMutableDictionary *albumInfo = [[NSMutableDictionary alloc] init];
MPMediaItemArtwork *artworkP;
UIImage *artWork = [UIImage imageNamed:album.imageUrl];
[albumInfo setObject:album.title forKey:MPMediaItemPropertyTitle];
[albumInfo setObject:album.auther forKey:MPMediaItemPropertyArtist];
[albumInfo setObject:album.title forKey:MPMediaItemPropertyAlbumTitle];
[albumInfo setObject:artworkP forKey:MPMediaItemPropertyArtwork];
[[MPNowPlayingInfoCenter defaultCenter] setNowPlayingInfo:albumInfo]
and also accessing remote event in application delegate for play,pause, next, previous event from lock screen. But the seek bar is not accessible, even i didn't find any option to set seek property.
i want to set seek property and want to access the seek slider change event in my app.

回答1:
I believe the only way to support forward and backward seeking is by the previous/advance buttons (they send a begin/end seeking notification when held down).
UIEventSubtypeRemoteControlBeginSeekingBackward, UIEventSubtypeRemoteControlBeginSeekingForward,
UIEventSubtypeRemoteControlEndSeekingBackward, UIEventSubtypeRemoteControlEndSeekingForward
Based on some of the other questions and documentation the seek bar is only accessible via Apple's own apps (https://stackoverflow.com/a/20142141/535632, https://stackoverflow.com/a/20909875/535632). According to that last answer, it appears some apps (notably Spotify) route their music through the music player to utilize the seek bar.
回答2:
You can use MPRemoteCommandCenter after iOS 7
来源:https://stackoverflow.com/questions/21549846/setting-and-accessing-ios-seek-bar-on-lock-screen