let member = BBB()
init()
{
super.init()
member.frame = self.frame
}
?Note that since this is a UIView subclass, you're actually implementing init(frame:) and init?(coder:), not init(). I usually unify the two by declaring subviews as lets and initializing them in a private setup method.
so I have this "member" in a class
class XXX: UIView
{
}if I do this, I got the error that self.member is not initialized before super.init
if I move it to before super.init, self.frame isn't available.
my solution to this chicken-egg thing is putting a ? after "member"