Search code examples
swiftiboutletiboutletcollection

How can I use an Outlet Collection with labels and buttons in one collection?


I am trying to make an Outlet collection that consists of labels and buttons. I was thinking I could just do something like @IBOutlet var basicCollection: [Any]! this doesn't seem to work. Any idea would be great.


Solution

  • Try

    @IBOutlet var basicCollection: [UIView]!
    

    Works for me.