Created
September 9, 2024 19:55
-
-
Save yccheok/f72761cb53c100145a6b025cdb9dcc91 to your computer and use it in GitHub Desktop.
This file contains 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 OnboardingViewControllerTemplate: UIViewController { | |
@IBOutlet weak var demoImageView: UIImageView! | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
} | |
override func viewDidLayoutSubviews() { | |
super.viewDidLayoutSubviews() | |
print(">>>> self.demoImageView.bounds.width \(self.demoImageView.bounds.width)") | |
demoImageView.subviews.forEach({ $0.removeFromSuperview() }) | |
let v = GradientView() | |
v.frame = CGRect( | |
x: 0, | |
y: self.demoImageView.bounds.height - 100, | |
width: self.demoImageView.bounds.width, | |
height: 100 | |
) | |
self.demoImageView.addSubview(v) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment