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

Popular posts from this blog

Email notification in google apps script -

c++ - Difference between pre and post decrement in recursive function argument -

javascript - IE11 incompatibility with jQuery's 'readonly'? -