NSArray works with Objective-C objects, which the "(float)
" cast I see up there most definitely is not.
To be more specific, "float
", "int
", "char
" are C data types, CGFloat is a Core Graphics data structure (and also not an Objective C object).
If you want to save colors in an array, they need to be true "UIColor
" Objective-C objects.
If you want to save your CGFloats in a NSArray, you can do the answer in this related question.