Reputation: 522
I don't think I am creating this array of UILabels correctly.
If I put a breakpoint after this line of code, it shows that the array is empty.
colorLabelArray = [[NSMutableArray alloc] initWithObjects: greenLabel, orangeLabel, blackLabel,purpleLabel, yellowLabel, redLabel, blueLabel, whiteLabel, nil];
If I do the same thing with UIImages it works just fine. What am I missing?
Upvotes: 2
Views: 293
Reputation: 84308
Are you certain that none of the label objects are nil? Specifically, if greenLabel
is nil, then initWithObjects:
will ignore the rest of the argument list and return an empty array.
Upvotes: 5