• <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 屏幕

        AVCaptureVideoPreviewLayer doesn#39;t fill up whole iPhone 4S Screen(AVCaptureVideoPreviewLayer 没有填满整个 iPhone 4S 屏幕)
          <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 屏幕的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  EAAccessory/EASession teardown during background(EAAccessory/EASession 在后台拆除)
                  Getting an NSArray of a single attribute from an NSArray(从 NSArray 获取单个属性的 NSArray)
                  ImageIO: lt;ERRORgt; JPEG Corrupt JPEG data: premature end of data segment iphone - how to catch this?(ImageIO:lt;错误gt;JPEG 损坏的 JPEG 数据:iphone 数据段过早结束 - 如何捕捉到这个?)
                  Xcode iOS organizer submit to app store yields quot;The archive is invalidquot; error(Xcode iOS 管理器提交到应用商店产生“存档无效;错误)
                  MFMessageComposeViewController alloc returns nil(MFMessageComposeViewController alloc 返回 nil)
                  How to add and get the values from .plist in iOS(如何在 iOS 中从 .plist 添加和获取值)
                  <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>
                            <tbody id='QIC7C'></tbody>