2

我有一个IBoutletCollection属性连接到UILabels几个Storyboard

@property (weak, nonatomic) IBOutletCollection(UILabel) NSArray *labels;

NSLog(@"%ld",(long)self.labels.count)viewDidLoad

结果得到了0

我在这里得到空的 ivar 有什么问题?

有什么问题Autolayout吗?(是的,我正在使用它Storyboard

感谢您的任何建议!

4

1 回答 1

1

更改weakstrong

@property (strong, nonatomic) IBOutletCollection(UILabel) NSArray *labels;

于 2015-08-26T08:12:39.650 回答