objective c - Swift override property set hidden like ObjectiveC -
in objectivec use sethidden invalidate intrinsic size
- (void)sethidden:(bool)hidden { super.hidden = hidden; [self invalidateintrinsiccontentsize]; }
and call on view like
view.hidden = yes;
but can't find how same on swift
in swift it's easy, if meant
class mycustomview : uiview{ override var hidden: bool { { return super.hidden } set(v) { super.hidden = v someotherfunction() } } } var view = mycustomview() view.hidden = true
Comments
Post a Comment