• <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 度?

        How to rotate an image 90 degrees on iOS?(如何在 iOS 上将图像旋转 90 度?)
              <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 度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  iOS 6 rotations: supportedInterfaceOrientations doesn#180;t work?(iOS 6 旋转:supportedInterfaceOrientations 不起作用?)
                  CABasicAnimation rotate returns to original position(CABasicAnimation 旋转返回原始位置)
                  UITabBarController Rotation Issues in ios 6(ios 6 中的 UITabBarController 旋转问题)
                  iOS: How to run a function after Device has Rotated (Swift)(iOS:设备旋转后如何运行函数(Swift))
                  UIImageView Gestures (Zoom, Rotate) Question(UIImageView 手势(缩放、旋转)问题)
                  Responsive website on iPhone - unwanted white space on rotate from landscape to portrait(iPhone上的响应式网站-从横向旋转到纵向时不需要的空白)
                • <legend id='zAaY8'><style id='zAaY8'><dir id='zAaY8'><q id='zAaY8'></q></dir></style></legend>
                      <tbody id='zAaY8'></tbody>
                    <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>

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