IBDesignable UIButtonGUI Code 2
@IBInspectable public var cornerRadius: CGFloat = 2.0 {didSet {
self.layer.cornerRadius = self.cornerRadius}}
@IBInspectable public var masksToBounds: Bool = false {didSet {self.layer.masksToBounds = self.masksToBounds}}
@IBInspectable public var borderWidth: CGFloat = 2.0 {didSet {self.layer.borderWidth = self.borderWidth}}
@IBInspectable public var borderColor: UIColor = UIColor.black {didSet {self.layer.borderColor = (self.borderColor.cgColor )}}
@IBInspectable public var shadowOffset: CGSize = CGSize(width: 10, height: 10) {
didSet {
self.layer.shadowOffset = self.shadowOffset
}
}
@IBInspectable public var shadowRadius: CGFloat = 2.0 {didSet {
self.layer.shadowRadius = self.shadowRadius
// can't use angle brackets on youtube. So replace ISGREATERTHAN with the appropriate angle bracket
if (shadowRadius ISGREATERTHAN 0){self.layer.shadowPath = UIBezierPath(rect: self.bounds).cgPath}
}}
@IBInspectable public var shadowOpacity: Float = 100 {didSet {
self.layer.shadowOpacity = self.shadowOpacity / 100
}}
@IBInspectable public var shadowColor: UIColor = UIColor.black {didSet {self.layer.shadowColor = (self.shadowColor.cgColor )}}
@IBInspectable public var shouldRasterize: Bool = true {didSet {self.layer.shouldRasterize = (self.shouldRasterize )}}
@IBInspectable public var animationSpeed: CGFloat = 1.0
Other Videos By Chris Phillips
2024-01-19 | UIButtonGUI Code 3 |
2024-01-19 | IBDesignable UIButtonGUI Code 2 |
2024-01-19 | IBDesignable UIButtonGUI Code |
2024-01-19 | Storyboard UIButtons (pt3) |
2024-01-19 | Storyboard UIButtons (pt2) |
2024-01-19 | Storyboard UIButtons (pt1) |
2024-01-19 | Intro to the Project pt2 |
2024-01-19 | Intro to the Project pt1 |
2024-01-19 | More Storyboarding |
2024-01-19 | NOCODE Storyboards Creating Views |
2023-09-27 | Cyberpunk Phantom Netrunner |
2023-09-22 | Cyberpunk Patch Notes |
2022-06-13 | Cat eats cricket |
2022-04-08 | Elden Ring - Fire Giant NO GLITCH KILL |
2022-02-24 | Cyberpunk 2077 - NCPD Scanner Badlands |
2021-06-26 | Cyberpunk 2077 Just Ads* |
2021-06-25 | Cyberpunk 2077 Iconic Skippy |
2021-03-27 | Cyberpunk chill |
2021-01-24 | Finding Skippy |
2020-12-26 | Cyberpunk 2077 - Netrunner Very Hard |
2020-12-26 | Cyberpunk 2077 - Netrunner Very Hard |