MPMoviePlayerViewController로 비디오를 재생하고 싶습니다. 그래서 내 뷰 컨트롤러에서 나는 MPMoviePlayerLoadStateDidChangeNotification
의 옵서버로 등록합니다.MPMoviePlayerLoadStateDidChangeNotification은 iOS 5에서 작동하지만 iOS 6에서는 작동하지 않습니다.
self.mPlayerVC = [[MPMoviePlayerViewController alloc] initWithContentURL:[NSURL URLWithString:@"<videoURL>"]];
및 통지가 도착하기를 기다립니다
나는 다음 MPMoviePlayerViewController을 초기화.
MPMoviePlayerController* playerController = notification.object;
if ([playerController loadState] & MPMovieLoadStatePlayable) {
if (self.mPlayerVC) {
[self presentMoviePlayerViewControllerAnimated:self.mPlayerVC];
}
}
사람이 아이폰 OS 5가 아닌 아이폰 OS 6 작동 이유를 생각 : 내가이 코드를 실행 않을 때? 감사합니다