NSArray chemConstantArray = [[NSArray alloc] initWithObjects:0.0021400, 0.0012840, 0.0010700, nil];
me donne quatre erreurs:objectif c tableaux de flottants et de booléens possibles?
Incompatible type for argument 1 of 'initWithObjects:'
Invalid initializer
Statically allocated instance of Objective-C class 'NSArray'
x 2
Ce qui est logique, car les flotteurs ne sont pas des objets, mais comment puis-je faire un tableau de flotteurs . J'ai besoin d'un pour BOOLs aussi.
Jetez un coup d'œil à cette réponse: http://stackoverflow.com/questions/1519115/initialize-nsarray-with-floats – drharris