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

Popular posts from this blog

python - Healpy: From Data to Healpix map -

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -