Objetivo c ERROR: tipos incompatibles para el argumento 2 de 'NSRunAlertPanel'
-
02-10-2019 - |
Pregunta
Este es el código:
float charlieSoundVolume;
charlieSoundVolume = [charlieSoundLevel floatValue];
NSRunAlertPanel(@"CHARLIE",charlieSoundVolume, @"", @"", @"Ok");
Esto me da el error: tipos incompatibles para el argumento 2 de 'NSRunAlertPanel'
Will NSRunAlertPanel no acepta los flotadores?
¿Alguna idea ??
Elijah
Solución
No estoy seguro de por qué se sorprendería de que no se necesita flotadores dada la documentación:
NSInteger NSRunAlertPanel (
NSString *title,
NSString *msg,
NSString *defaultButton,
NSString *alternateButton,
NSString *otherButton,
...
);
Pasar una cadena.
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow