首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >UIAlertView消息

UIAlertView消息
EN

Stack Overflow用户
提问于 2009-12-16 17:19:50
回答 1查看 1.9K关注 0票数 0

尝试在UIAlertView显示的消息中包含实例变量。

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

但是,当显示Alert时,不会显示任何消息。

如有任何想法和帮助,我们将不胜感激:)

相同的

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2009-12-16 18:37:14

你有没有尝试过:

代码语言:javascript
复制
[NSString stringWithFormat:@"You Were Wrong, the correct structure was %@", structureName]

而不是

代码语言:javascript
复制
(@"You Were Wrong, the correct structure was %@", structureName)
票数 6
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/1913366

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档