سؤال

هنا هو الرمز:

float charlieSoundVolume;
charlieSoundVolume = [charlieSoundLevel floatValue];

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

هذا يعطيني الخطأ: الأنواع غير المتوافقة للسيجة 2 من "nsrunalertpanel"

هل لن يقبل NSRUNALERTPANEL العوامات؟

أيه أفكار؟؟

إيليا

هل كانت مفيدة؟

المحلول

لست متأكدًا من سبب تفاجأك بأنه لا يستغرق عوامات بالنظر إلى الوثائق:

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

تمرير سلسلة.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top