Last active
March 30, 2020 13:18
-
-
Save alvaroroyo/0dcc7c8af17576d8f81292b084cb1f0d 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
override open func awakeFromNib() { | |
super.awakeFromNib() | |
let nibName = String(describing: type(of: self)) | |
guard let view = Bundle.main.loadNibNamed(nibName, owner: self, options: nil)?.first as? UIView else { return } | |
view.frame = self.bounds | |
view.autoresizingMask = [.flexibleHeight,.flexibleWidth] | |
self.addSubview(view) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment