这是代码:

float charlieSoundVolume;
charlieSoundVolume = [charlieSoundLevel floatValue];

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

这给了我错误:“ nsrunaLertpanel”参数2的不兼容类型

NsrunaLertpanel会不接受浮标吗?

有任何想法吗??

以利亚

有帮助吗?

解决方案

我不确定为什么您会感到惊讶的是,鉴于文档的情况不需要浮子:

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

传递字符串。

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top