سؤال

محاولة تضمين متغير مثيل في رسالة أن uialertView يظهر.

lostAlert = [[UIAlertView alloc] initWithTitle:@"Sorry" message:(@"You Were Wrong, the correct structure was %@", structureName)  delegate:self cancelButtonTitle:@"Dismiss" otherButtonTitles:nil];

ومع ذلك، عند إظهار التنبيه، لا يتم عرض أي رسالة.

أي أفكار ومساعدة ستكون موضع تقدير :)

سام

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

المحلول

هل جربتها مع:

[NSString stringWithFormat:@"You Were Wrong, the correct structure was %@", structureName]

بدلاً من

(@"You Were Wrong, the correct structure was %@", structureName)
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top