Is there a way to call a specific outlet thats in a outlet collection?

84 views Asked by At

I am trying to see if there is a way to call an outlet thats in an outlet collection that has a tag associated with it. I have looked around and check on here but nothing seems to really answer this question

1

There are 1 answers

1
Sam On

Well right after I posted this I figured it out.. If anyone else has this question below is what I did to resolve it. If there is a better way to do it please comment! Make sure you set a tag for each object that you have in your collection an then just reference that tag.

for view in bgViews {

            if view.tag == 1 {

                //example used to test it
                view.isHidden = true
            }