Skip to content

Instantly share code, notes, and snippets.

@stevencurtis
Created May 12, 2020 09:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stevencurtis/15fc70f9ff884d3214eb53981ed06cc8 to your computer and use it in GitHub Desktop.
Save stevencurtis/15fc70f9ff884d3214eb53981ed06cc8 to your computer and use it in GitHub Desktop.
uiviewRotated
let rotatedView = UIView(frame: CGRect(origin: CGPoint(x: 100, y: 100), size: CGSize(width: 100, height: 100)))
rotatedView.backgroundColor = .blue
let rotation: CGFloat = CGFloat.pi / 4
rotatedView.transform = CGAffineTransform(rotationAngle: rotation)
self.addSubview(rotatedView)
rotatedView.frame
rotatedView.bounds
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment