I have an IBoutletCollection
property connected to several UILabels
in Storyboard
:
@property (weak, nonatomic) IBOutletCollection(UILabel) NSArray *labels;
called
NSLog(@"%ld",(long)self.labels.count)
after viewDidLoad
got 0
as result.
what's the problem I got empty ivar here?
anything wrong with the Autolayout
? (Yes I'm using it in Storyboard
)
Thanks for any advice!
Change weak
to strong
@property (strong, nonatomic) IBOutletCollection(UILabel) NSArray *labels;