Skip to content

Instantly share code, notes, and snippets.

@Aymenworks
Last active January 25, 2019 10:06
Show Gist options
  • Save Aymenworks/0d8288df504df90078b20cbf5436be2d to your computer and use it in GitHub Desktop.
Save Aymenworks/0d8288df504df90078b20cbf5436be2d to your computer and use it in GitHub Desktop.
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