layout - Setting alpha a group of elements in a view in SWIFT -
i've created layout using xcode's autolayout. have number of views label , imageview inside. there way change alpha labels , imageview without creating outlets of them in viewcontroller in code? change alpha elements inside view in code, not changing view?
you can enumerate through views subviews , set alpha way.
for v in view.subviews { let view = v as! uiview view.alpha = 0 } another approach use iboutletcollection can create in interface builder
Comments
Post a Comment