0

I can only access the id of my outlet collection and an id does not have a hidden property

This is my outlet collection

@property (strong, nonatomic) IBOutletCollection(UIImageView) NSArray *hearts;

and this is when I try to call it, and change it to hidden.

[self.hearts objectAtIndex:0].hidden =YES;

I can not because objectAtIndex only returns an id

Thanks for any help

tnek316
  • 630
  • 1
  • 5
  • 16

1 Answers1

0

You can try enumerating the objects in the collection, using the type you expect (eg, for (UIView *heartView in self.hearts)) or first cast the objectAtIndex:0 and then set the hidden property.

azsromej
  • 1,619
  • 13
  • 15