Question

Voici le code:

float charlieSoundVolume;
charlieSoundVolume = [charlieSoundLevel floatValue];

NSRunAlertPanel(@"CHARLIE",charlieSoundVolume, @"", @"", @"Ok");

Cela me donne l'erreur: types incompatibles pour l'argument 2 de 'NSRunAlertPanel'

Will NSRunAlertPanel pas accepter flotte?

Toutes les idées ??

Elijah

Était-ce utile?

La solution

Je ne sais pas pourquoi vous seriez surpris de voir qu'il ne prend pas flotte compte tenu de la documentation:

NSInteger NSRunAlertPanel (
   NSString *title,
   NSString *msg,
   NSString *defaultButton,
   NSString *alternateButton,
   NSString *otherButton,
   ...
);

Passez une chaîne.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top