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
0
votes
1 answer

Displaying elements of an array on a buttons

I am working on an educational game for a local school system, in this game students are presented with six numbers and they have to try and use as many of them as they can to equal a seventh number, the numbers are stored in an array called…
0
votes
1 answer

Using prepareforsegue to pass an image from a IBOutletCollection of Buttons

I have two View Controllers: 1. With two buttons with different images. 2. With an UIImageView. I'm trying to pass the image of the selected button at VC1 to the Image View at VC2 with an outlet collection without having to declare an IBoutlet for…
0
votes
1 answer

xcode array access with IBOutletCollections. Mind-boggled.

I have 2 arrays. One is a collection of buttons. The other one should be an array of dictionaries. I am logging the length/size/count of object in the arrays in the console using [arrayListName count]: 2012-07-19 19:56:59.001 ABC[3224:707]…
jimbob
  • 3,288
  • 11
  • 45
  • 70
0
votes
1 answer

What's the correct way to set the text of a UILabel that's part of an IBOutletCollection

I have a series of UILabels that form part of an IBOutletCollection @property (strong, nonatomic) IBOutletCollection(UILabel) NSArray *labelCollection; I have sequentially set the tags of the UILabels to 0,1,2,3 ... and I have sorted the…
So Over It
  • 3,668
  • 3
  • 35
  • 46
0
votes
1 answer

IBOutletCollection and initializing Custom Class Instance

I am using the MHRotaryKnob Class and having trouble configuring it so that multiple outlets have the same default settings. It is no problem to get it working with one instance using IBOutlet, but now it is looking for the properties of the…
frankie
  • 661
  • 2
  • 10
  • 25
-1
votes
1 answer

Showing/Hiding images in CollectionView Cell

I'm trying to show some images and hide others using ".isHidden" in my CollectionView. But when I scroll down or reload the collectionView they either get reordered incorrectly or hidden entirely. func collectionView(_ collectionView:…
-1
votes
1 answer

IBOutletCollection collection

I'm looking for a way to change background color only for buttons that have the same text. So I created (at this time only 2) IBOutletCollections and 1 IBAction to test. But I have 27 different button numbers to code... or do I need to create 27…
Quentin F.
  • 17
  • 2
-1
votes
1 answer

Swift outlet collection - 'IBOutlet' property cannot be an array of non-'@objc' class type

I'm trying to setup an outlet collection in swift. The problem is I am getting the following error : 'IBOutlet' property cannot be an array of non-'@objc' class type '[Badge]' Here is my code : import UIKit class BadgeModuleCell:…
Aeradriel
  • 1,224
  • 14
  • 36
-2
votes
1 answer

How to add a border all labels to an array of labels in an outlet collection in Swift?

class ViewController: UIViewController { @IBOutlet var labels: [UILabel]! override func viewDidLoad() { super.viewDidLoad() labels[0].layer.borderWidth = 1 labels[0].layer.borderColor = UIColor.black.cgColor …
Vu Tran
  • 11
  • 2
-3
votes
1 answer

Swift error "Only instance properties can be declared @IBOutlet"

I'm trying to make the buttons with rounded corners. So far this is what I have. I keep getting the "Only instance properties can be declared @IBOutlet" error. import UIKit class ViewController: UIViewController { override func viewDidLoad()…
-6
votes
1 answer

Change the backgroundcolor of UIButton in IBOutletCollection

I have 16 button. And I want to change background color of button, when button is clicked. This is my code: @IBOutlet var buttons: [UIButton]! @IBAction func button_Taped(_ sender: UIButton) { } } How can I change when clicked the buutton…
1 2 3 4 5 6
7