To answer your initial question, an id
which is what NSMutableArray -objectAtIndex:
returns, doesn't have a receiver named tag
. You should first cast your result to a UIButton
before sending the tag message. Like this: ((UIButton *)self.emptySpaces[0]).tag
You could try something like this:
for (UIButton *button in self.emptySpaces) {
if (button.tag == 1) {
}
}