Andrew B. Andrew B. - 1 year ago 71
Swift Question

Hide an Outlet Collections object

I am trying to hide multiple ImageViews.

@IBOutlet var closedImage: Array<UIImageView>!


But it says: Value of type 'Array' has no member 'hidden'

Is there a way to hidde this ImageViews?

Answer Source

Because of closedImage is an array, you have to iterate over it:

for image in closedImage {
    image.hidden = true
}