Questions tagged [iboutletcollection]

The type qualifier IBOutletCollection is a tag applied to an instance-variable declaration so that the Interface Builder application can recognize the instance variable as an outlet and synchronize the display and connection of it with Xcode. It works in a similar way to IBOutlet except it allows a collection of objects

101 questions
57
votes
7 answers

Swift - IBOutletCollection equivalent

I'm trying to replicate the Stanford Matchismo game from "Developing ios7 apps for iphone and ipad" in iTunesU in Swift. On page 77 of the 3rd lecture slides, it shows using an IBOutletCollection which isn't an option on Swift. The Swift doc…
Alcanzar
  • 16,985
  • 6
  • 42
  • 59
37
votes
5 answers

Swift put multiple IBOutlets in an Array

I made these (marked with red border) IBOutlets using ctrl + drag But i don't like to have the exact same line 9 times (DRY) How do i put these IBOutlets in an Array?
cor
  • 617
  • 2
  • 6
  • 11
36
votes
4 answers

What is Referencing outlet collection in Xcode4 Interface Builder?

Here, I have pointed to the Referencing Outlet Collection. I am not able to figure out its usage in XCode4. I am asking for the `new feature of REFERENCING OUTLET COLLECTION in InterfaceBuilder of XCode4".
sagarkothari
  • 24,520
  • 50
  • 165
  • 235
32
votes
5 answers

How to make IBOutlets out of an array of objects?

I want to make an array with a bunch of UIImageViews I have in Interface Builder. Instead of having 20 or 30 IBOutlet UIImageView *img1; and linking them all that way, and then putting them into an array, is there a way to declare an array of…
Marty
  • 5,926
  • 9
  • 53
  • 91
31
votes
1 answer

How can I use IBOutletCollection to connect multiple UIImageViews to the same outlet?

I have 10 UIImageViews which do the same thing (they have some void methods that change their image with a timer). My UIImageView is an outlet and I want to connect all the 10 imageViews to the same outlet, but interface builder doesn't allow me. I…
BalestraPatrick
  • 9,944
  • 4
  • 30
  • 43
8
votes
2 answers

Can I connect multiple objects with different tags to the same IBOutlet?

I have 30 buttons in one view in Interface Builder. Each has a different tag between 100001 and 100030. I've found it easy to use the same action for each button, passing along the tag for each one when pressed and using code to decide which level…
SW_Cali
  • 383
  • 2
  • 17
6
votes
3 answers

How to hide a bunch of labels in an IBOutletCollection?

New to Objective-C and iOS development, would love a hand here! I have written up some code such that IBOutletCollection(UILabel) NSArray *allLabels; In IB I have linked up all my labels in my view to this collection, where I want to hide them for…
Ben T
  • 141
  • 1
  • 10
5
votes
1 answer

Can I use IBOutletCollection with WatchKit?

I'm tring to use IBOutletCollection to connect multiple interface views. Like this one: @property (weak, nonatomic) IBOutletCollection(WKInterfaceLabel) NSSet *interfaceLables; But that doesn't show on interface builder, so I cannot use it.…
Idan
  • 9,880
  • 10
  • 47
  • 76
4
votes
2 answers

Can't link to outlet collection in XCode9

I have some constraints that a shuffle around during an animation. After upgrading to XCode9 I tried to make some tweaks, and the editor seems to no longer allow me to add constraints to an constraint collection IBOutlet. I even created a new…
Kevin DiTraglia
  • 25,746
  • 19
  • 92
  • 138
4
votes
2 answers

Array of Outlets of type Label

I have 16 Outlets variables. @IBOutlet var label00: UILabel? @IBOutlet var label01: UILabel? @IBOutlet var label02: UILabel? @IBOutlet var label03: UILabel? @IBOutlet var label10: UILabel? @IBOutlet var label11: UILabel? @IBOutlet var label12:…
hatim
  • 218
  • 4
  • 16
4
votes
4 answers

Is it possible to use something like an IBOutlet array?

I have a top list view in my current iPhone app, that's populated by code. I've assembled the view using Interface Builder, so it contains lot of UILabels. Obviously I wouldn't like to have name1, name2, etc. outlets in my class, but prefer a…
shinjin
  • 2,858
  • 5
  • 29
  • 44
4
votes
1 answer

Method to determine id of sender

I have code that works but I want to make sure I am doing things properly and cleanly. I have four versions of the same collection of views displayed on a screen. Each collection which will be used to control the volume and rate of four different…
ChemDev
  • 827
  • 1
  • 8
  • 23
3
votes
2 answers

How to connect 3 UIButton to one outlet

I try to do something like this @IBoutlet var buttons : [UIButton] but I can't drag button to this outlet Any idea, how can I achieve that?
motivated
  • 53
  • 8
3
votes
1 answer

hooking up two different storyboard viewcontrollers to a same class

I am new to Iphone development. My app consists of two storyboards one for the Ipad and other for the Iphone.Now, my problem is I have an IBOutletCollection of UILabels hooked up as a property with one of the viewcontrollers in my Iphone…
3
votes
3 answers

How Can I orderly arrange items in Referencing Outlet Collection automatically?

I have Referencing Outlet Collection of UITextfields arranged in Xib as one below another. When I print Referencing Outlet Collection I found that its orderless. I need to automatically arrange text fields, ie text fileld comes 1st in UI should…
Harikrishnan
  • 9,688
  • 11
  • 84
  • 127
1
2 3 4 5 6 7