Last active
January 25, 2019 10:06
-
-
Save Aymenworks/0d8288df504df90078b20cbf5436be2d 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
class AsanaLoadingView: UIView { | |
// MARK: Properties | |
private struct Colors { | |
static let pink = #colorLiteral(red: 0.9294117647, green: 0.5215686275, blue: 0.568627451, alpha: 1) | |
static let beige = #colorLiteral(red: 0.968627451, green: 0.8274509804, blue: 0.6666666667, alpha: 1) | |
} | |
let gradientLayer = CAGradientLayer() | |
// MARK: Lifecycle | |
override init(frame: CGRect) { | |
super.init(frame: frame) | |
setup() | |
} | |
required init?(coder aDecoder: NSCoder) { | |
super.init(coder: aDecoder) | |
setup() | |
} | |
override func layoutSubviews() { | |
super.layoutSubviews() | |
gradientLayer.frame = bounds | |
} | |
// MARK: Setup | |
private func setup() {} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment