When creating custom views, I generally create an initialization function by overriding the init(frame) function. When creating the view in my ViewController I initialize the view by passing in the .zero frame, and then set the layout using Material's layout function.
let descView = DescriptionView(frame: .zero)
However, this makes it so that my views in my custom view are not resized. For example, when setting up a custom text view in my custom view, it does not show up because I prepare it as so:
self.layout(descriptionTextView).width(self.width).height(self.height).centerVertically().centerHorizontally()
I assume it doesn't show up because when I initialize the view, its width and height are zero. What can I do to get around this?