• <tfoot id='lEIZY'></tfoot>

    <legend id='lEIZY'><style id='lEIZY'><dir id='lEIZY'><q id='lEIZY'></q></dir></style></legend>

    <small id='lEIZY'></small><noframes id='lEIZY'>

      <bdo id='lEIZY'></bdo><ul id='lEIZY'></ul>

        <i id='lEIZY'><tr id='lEIZY'><dt id='lEIZY'><q id='lEIZY'><span id='lEIZY'><b id='lEIZY'><form id='lEIZY'><ins id='lEIZY'></ins><ul id='lEIZY'></ul><sub id='lEIZY'></sub></form><legend id='lEIZY'></legend><bdo id='lEIZY'><pre id='lEIZY'><center id='lEIZY'></center></pre></bdo></b><th id='lEIZY'></th></span></q></dt></tr></i><div id='lEIZY'><tfoot id='lEIZY'></tfoot><dl id='lEIZY'><fieldset id='lEIZY'></fieldset></dl></div>

        我的 iPhone 视频仅在纵向模式下播放

        时间:2023-10-23
      1. <i id='ApcbG'><tr id='ApcbG'><dt id='ApcbG'><q id='ApcbG'><span id='ApcbG'><b id='ApcbG'><form id='ApcbG'><ins id='ApcbG'></ins><ul id='ApcbG'></ul><sub id='ApcbG'></sub></form><legend id='ApcbG'></legend><bdo id='ApcbG'><pre id='ApcbG'><center id='ApcbG'></center></pre></bdo></b><th id='ApcbG'></th></span></q></dt></tr></i><div id='ApcbG'><tfoot id='ApcbG'></tfoot><dl id='ApcbG'><fieldset id='ApcbG'></fieldset></dl></div>

          <tbody id='ApcbG'></tbody>

            <tfoot id='ApcbG'></tfoot>
            • <legend id='ApcbG'><style id='ApcbG'><dir id='ApcbG'><q id='ApcbG'></q></dir></style></legend>

              <small id='ApcbG'></small><noframes id='ApcbG'>

                • <bdo id='ApcbG'></bdo><ul id='ApcbG'></ul>
                  本文介绍了我的 iPhone 视频仅在纵向模式下播放的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在使用 MPMoviePlayerController 播放电影.电影以纵向模式开始(因为这是应用程序使用的唯一模式),即使设备旋转也会停留在那里.我从未明确设置过 shouldAutoRotateetc.响应横向和纵向的功能,因为我不希望我的视图调整大小.有没有办法让视频响应纵向和横向旋转?任何帮助将不胜感激.

                  I am using MPMoviePlayerController to play a movie. The movie starts in portrait mode (as that's the only mode the app uses) and stays there even if the device is rotated. I never explicitly set the shouldAutoRotateetc. function to respond to landscape and portrait because I don't want my views resizing. Is there a way to get the video to respond to portrait and landscape rotations? Any help would be greatly appreciated.

                  仅供参考:这是我的代码

                  FYI: Here is my code

                  NSString *filepath = [[NSBundle mainBundle] pathForResource:@"TestMovie" ofType:@"m4v"];
                  NSURL *fileURL = [NSURL fileURLWithPath:filepath];
                  MPMoviePlayerController *moviePlayerController = [[MPMoviePlayerController alloc] initWithContentURL:fileURL];
                  
                  //Listen so we can clean up after the movie is over
                  [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(moviePlaybackComplete:) name:MPMoviePlayerPlaybackDidFinishNotification object:moviePlayerController];
                  
                  [self.view addSubview:moviePlayerController.view];
                  [moviePlayerController setFullscreen:YES animated:YES];
                  [moviePlayerController play];
                  

                  推荐答案

                  嗯.行.在我被难住了半小时后想通了.

                  Hmm. OK. Figured it out a half-hour after I was stumped.

                  现在显然有一个 MPMoviePlayerViewController 可以处理所有这些.这是我的新更新代码:

                  There is apparently now an MPMoviePlayerViewController that handles all that. Here's my new updated code:

                      MPMoviePlayerViewController *moviePlayerView = [[[MPMoviePlayerViewController alloc] initWithContentURL:videoURL] autorelease];
                  [self presentMoviePlayerViewControllerAnimated:moviePlayerView];
                  

                  这将允许它响应旋转事件等.很好!

                  This will allow it to respond to rotation events, etc. Nice!

                  这篇关于我的 iPhone 视频仅在纵向模式下播放的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:UISearchBar 搜索带有文本、潜文本和图像的表格行 下一篇:我应该何时释放 [[UIApplication sharedApplication] delegate] 对象?

                  相关文章

                  • <bdo id='4Cxqj'></bdo><ul id='4Cxqj'></ul>

                • <i id='4Cxqj'><tr id='4Cxqj'><dt id='4Cxqj'><q id='4Cxqj'><span id='4Cxqj'><b id='4Cxqj'><form id='4Cxqj'><ins id='4Cxqj'></ins><ul id='4Cxqj'></ul><sub id='4Cxqj'></sub></form><legend id='4Cxqj'></legend><bdo id='4Cxqj'><pre id='4Cxqj'><center id='4Cxqj'></center></pre></bdo></b><th id='4Cxqj'></th></span></q></dt></tr></i><div id='4Cxqj'><tfoot id='4Cxqj'></tfoot><dl id='4Cxqj'><fieldset id='4Cxqj'></fieldset></dl></div>

                    <legend id='4Cxqj'><style id='4Cxqj'><dir id='4Cxqj'><q id='4Cxqj'></q></dir></style></legend>

                    1. <small id='4Cxqj'></small><noframes id='4Cxqj'>

                      <tfoot id='4Cxqj'></tfoot>