I am having trouble creating an outlet collection in Xcode 6. Outlet collections in Xcode 6 now function as regular IBOutlets, and you use the same @IBOutlet attribute to declare an outlet collection while being sure to specify an array for the type. I have done this in my view controller's swift file i.e.
@IBOutlet var cardButtons: UIButton[]
In Xcode 5 when one control drags from an element in the storyboard to the corresponding view controller using the assistant editor they are presented with an option to create either an outlet or an outlet collection. This seems to no longer be possible in Xcode 6 and my guess is because outlets and outlet collection now share the same @IBOutlet attribute. How should I create an outlet collection which will contain say 10 buttons without being able to control drag each one from the storyboard view and hook it up to my
@IBOutlet var cardButtons: UIButton[]
property in my view controller swift file?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…