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 t
self.imageview.transform = CGAffineTransformMakeRotation(M_PI_2);
Swift 4+:
self.imageview.transform = CGAffineTransform(rotationAngle: CGFloat(Double.pi/2))