カスタムUISiderコントロールがあり、コントロールをスライドさせると、requestThumbnailImagesAtTimesをMPMoviePlayerControllerに送信します。
- (void)sliderPopoverView:(UISlider*)slider
{
self.currentSliderValue = slider.value;
[self.moviePlayer requestThumbnailImagesAtTimes:[NSArray arrayWithObject:[NSNumber numberWithDouble:self.currentSliderValue]]
timeOption:MPMovieTimeOptionNearestKeyFrame];
}
- (void)requestFinishThumbnail:(NSNotification*)notification
{
UIImage *thumbnailImage = [notification.userInfo objectForKey:MPMoviePlayerThumbnailImageKey];
if (thumbnailImage) {
_bottomView.sliderPopover.popover.thumbnailView.image = thumbnailImage;
}
}
それから私はショーのためのたくさんのイメージを受け取ることができます. しかし、メインスレッドがブロックされました。カスタム コントロールをスライドするのは難しいです。多くの時間を費やします。