trouble accessing array elements in Objective C [closed]

It is impossible that objectAtIndex: should return nil, so your code is meaningless. No NSArray can contain nil. And if tipPercentages is not an NSArray (for example, if it’s a C array), then it can’t respond to objectAtIndex:.

Leave a Comment