Created
July 13, 2017 01:12
-
-
Save jimmythai/6d08dc100dac4990efc73519d95eb4dc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let frame = CGRect(x: 0, y: 0, width: 380, height: 600) | |
| let view = UIView(frame: frame) | |
| let gradient = CAGradientLayer() | |
| gradient.frame = frame | |
| gradient.colors = [UIColor.blue.cgColor, UIColor.green.cgColor] | |
| gradient.startPoint = CGPoint(x: 0.408, y: 0) | |
| gradient.endPoint = CGPoint(x: 0.746, y: 1) | |
| view.layer.addSublayer(gradient) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment