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

  • <legend id='tJOgM'><style id='tJOgM'><dir id='tJOgM'><q id='tJOgM'></q></dir></style></legend>
      <bdo id='tJOgM'></bdo><ul id='tJOgM'></ul>

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

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

        如何在 iOS 上将图像旋转 90 度?

        时间:2023-05-19
              <tbody id='bRlPs'></tbody>
              <bdo id='bRlPs'></bdo><ul id='bRlPs'></ul>
              <legend id='bRlPs'><style id='bRlPs'><dir id='bRlPs'><q id='bRlPs'></q></dir></style></legend>
              <i id='bRlPs'><tr id='bRlPs'><dt id='bRlPs'><q id='bRlPs'><span id='bRlPs'><b id='bRlPs'><form id='bRlPs'><ins id='bRlPs'></ins><ul id='bRlPs'></ul><sub id='bRlPs'></sub></form><legend id='bRlPs'></legend><bdo id='bRlPs'><pre id='bRlPs'><center id='bRlPs'></center></pre></bdo></b><th id='bRlPs'></th></span></q></dt></tr></i><div id='bRlPs'><tfoot id='bRlPs'></tfoot><dl id='bRlPs'><fieldset id='bRlPs'></fieldset></dl></div>

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

                <tfoot id='bRlPs'></tfoot>

                  本文介绍了如何在 iOS 上将图像旋转 90 度?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  限时送ChatGPT账号..

                  我想做的是从我的相机拍摄快照,将其发送到服务器,然后服务器将图像发送回 viewController 上.如果图像处于纵向模式,则图像在屏幕上显示良好,但是如果图像是在横向模式下拍摄的,则图像在屏幕上会出现拉伸(因为它试图以纵向模式出现!).我不知道如何解决这个问题,但我想一个解决方案是首先检查图像是否处于纵向/横向模式,然后如果它处于横向模式,则将其旋转 90 度,然后再将其显示在屏幕上.那我该怎么做呢?

                  What I want to do is take a snapshot from my camera , send it to a server and then the server sends me back the image on a viewController. If the image is in portrait mode the image appears well on screen , however if the image was taken in landscape mode the image appears streched on the screen(as it tries to appear on portrait mode!). I dont know how to fix this but i guess one solution is first to check if the image is in portrait/landscape mode and then if it is on landscape mode rotate it by 90degrees before showing it on screen. So how could i do that?

                  推荐答案

                  self.imageview.transform = CGAffineTransformMakeRotation(M_PI_2);
                  

                  Swift 4+:

                  self.imageview.transform = CGAffineTransform(rotationAngle: CGFloat(Double.pi/2))
                  

                  这篇关于如何在 iOS 上将图像旋转 90 度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:如何捕获当前视图屏幕截图并在代码中重用?(iPhone SDK) 下一篇:iPhone上的响应式网站-从横向旋转到纵向时不需要的空白

                  相关文章

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

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