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

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

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

          <bdo id='x2z53'></bdo><ul id='x2z53'></ul>
        <tfoot id='x2z53'></tfoot>

      1. AVCaptureVideoPreviewLayer 没有填满整个 iPhone 4S 屏幕

        时间:2023-10-23
          <tbody id='aHBrs'></tbody>
        <tfoot id='aHBrs'></tfoot>
            <bdo id='aHBrs'></bdo><ul id='aHBrs'></ul>

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

              <legend id='aHBrs'><style id='aHBrs'><dir id='aHBrs'><q id='aHBrs'></q></dir></style></legend>
              1. <i id='aHBrs'><tr id='aHBrs'><dt id='aHBrs'><q id='aHBrs'><span id='aHBrs'><b id='aHBrs'><form id='aHBrs'><ins id='aHBrs'></ins><ul id='aHBrs'></ul><sub id='aHBrs'></sub></form><legend id='aHBrs'></legend><bdo id='aHBrs'><pre id='aHBrs'><center id='aHBrs'></center></pre></bdo></b><th id='aHBrs'></th></span></q></dt></tr></i><div id='aHBrs'><tfoot id='aHBrs'></tfoot><dl id='aHBrs'><fieldset id='aHBrs'></fieldset></dl></div>
                  本文介绍了AVCaptureVideoPreviewLayer 没有填满整个 iPhone 4S 屏幕的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  AVCaptureVideoPreviewLayer *avLayer = 
                                  [AVCaptureVideoPreviewLayer layerWithSession:session];
                  avLayer.frame = self.view.frame;
                  [self.view.layer addSublayer:avLayer];
                  

                  我使用 AVCaptureVideoPreviewLayer 在视图上显示视频.但是视频的视图并没有填满整个 iPhone4 的屏幕.(左右两侧的灰色条)

                  I use AVCaptureVideoPreviewLayer to display video on the view. But the video's view didn't fill up the full iPhone4's screen.(two grey bar at the right&left side)

                  我希望视频充满全屏.我该如何处理?非常感谢!

                  I want the video fills up full screen. How can I deal with it? Thank you very much!

                  推荐答案

                  这样可以解决吗?

                  CGRect bounds=view.layer.bounds;
                  avLayer.videoGravity = AVLayerVideoGravityResizeAspectFill;
                  avLayer.bounds=bounds;
                  avLayer.position=CGPointMake(CGRectGetMidX(bounds), CGRectGetMidY(bounds));
                  

                  这篇关于AVCaptureVideoPreviewLayer 没有填满整个 iPhone 4S 屏幕的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:我应该如何构建我的 iPhone 应用程序以与我的网站对话? 下一篇:使用 iphone sdk 在钥匙串中保存时出错

                  相关文章

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

                  1. <small id='QIC7C'></small><noframes id='QIC7C'>

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