我有一个 UIButtons 的 IBOutletCollection。在我的 mutableArray 按钮中检索任何索引的标签的最有效方法是什么。
@property(retain) IBOutletCollection(UIButton) NSMutableArray *emptySpaces;
这就是我的按钮的声明方式
@property (strong, nonatomic) IBOutlet UIButton *position1;
我试过以下。我做错了什么?谢谢
if(emptySpaces[0].tag == 1){
}
或者
if([emptySpaces objectAtIndex:0].tag == 1){
}