Skip to content

Instantly share code, notes, and snippets.

@pchelnikov
Created January 25, 2018 08:37
Show Gist options
  • Save pchelnikov/ac242e8c3c353eee35208bec6db632a4 to your computer and use it in GitHub Desktop.
Save pchelnikov/ac242e8c3c353eee35208bec6db632a4 to your computer and use it in GitHub Desktop.
Move image to right in UIButton
button.transform = CGAffineTransform(scaleX: -1.0, y: 1.0)
button.titleLabel!.transform = CGAffineTransform(scaleX: -1.0, y: 1.0)
button.imageView!.transform = CGAffineTransform(scaleX: -1.0, y: 1.0)
b.imageEdgeInsets = UIEdgeInsets(top: 0, left: -10.5, bottom: 0, right: 0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment