在UIAlertView中调用NSString?
嘿,我正在使用 theos 进行编码,我希望 NSString 的值显示在下面 UIAlertView 上的字段内,我将如何编写它?这里是:
UIAlertView *quickreply = [[UIAlertView alloc] initWithTitle:@"%@" message:@"%@" delegate:self cancelButtonTitle:@"Close" otherButtonTitles:@"Reply", nil];
我尝试在引号后写一个 , NSStringID 但它给整个 UIAlertView 带来错误,所以我不知道我应该如何编码它,我应该在引号内使用括号还是更多引号,或者括号’或者什么?
请帮忙
hey I'm coding using theos and I want the value of an NSString to display inside of the fields on the UIAlertView below, how would i go about writing that? here it is:
UIAlertView *quickreply = [[UIAlertView alloc] initWithTitle:@"%@" message:@"%@" delegate:self cancelButtonTitle:@"Close" otherButtonTitles:@"Reply", nil];
I've tried writing a , NSStringID after the quotes but it gives errors for the entire UIAlertView, so idk how I'm supposed to code it, am i supposed to use brackets or more quotes within the quotes, or parenthesis' or what?
please help
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
stringWithFormat 是你想要的,试试这个:
stringWithFormat is what you want, try this:
使用:
如果你想这样做的话。希望有帮助!
Use:
if you want to do it that way. Hope that helps!
将 UIAlertView 的消息设置为消息 NSString
set the message of the UIAlertView to the message NSString