Last active
July 16, 2020 06:19
-
-
Save Josscii/27b82c0aa78f220ff0c94da99977d38f to your computer and use it in GitHub Desktop.
GradientView 方便布局
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 GradientView: UIView { | |
var gradientLayer: CAGradientLayer { | |
return layer as! CAGradientLayer | |
} | |
override class var layerClass: AnyClass { | |
return CAGradientLayer.self | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment