Skip to content

Instantly share code, notes, and snippets.

View dinoali's full-sized avatar

Ali dinoali

  • PT. Monstera Inti Teknologi
  • Jakarta
View GitHub Profile
@dinoali
dinoali / UIImageFixedOrientationExtension.swift
Last active December 17, 2019 03:21 — forked from schickling/UIImageFixedOrientationExtension.swift
Extension to fix orientation of an UIImage (Sets orientation to portrait)
extension UIImage {
func fixedOrientation() -> UIImage {
if imageOrientation == UIImageOrientation.Up {
return self
}
var transform: CGAffineTransform = CGAffineTransformIdentity