【问题标题】:How to put quote in a string? [duplicate]如何将引号放在字符串中? [复制]
【发布时间】:2014-10-20 04:48:01
【问题描述】:

我是 iOS 新手。我的问题是我们如何将来自电子邮件的字符串放在双引号“”中?

NSString* messageString = [NSString stringWithFormat: @"%@ does not apppear to be valid email address.Do You Want sent Anyway?", email];
UIAlertView *alertView =[[UIAlertView alloc]initWithTitle:@"Invalid adress" message:messageString delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"OK", nil];
[alertView show];
break;

【问题讨论】:

  • 使用这个 > \" 例如\"Invalid Email\"

标签: objective-c nsstring


【解决方案1】:

使用此代码

NSString* messageString = [NSString stringWithFormat: @"\"%@\" does not appear to be valid email address.Do You Want sent Anyway?", email];

【讨论】:

    猜你喜欢
    • 2018-05-06
    • 2012-09-02
    • 2011-12-07
    • 1970-01-01
    • 1970-01-01
    • 2014-09-28
    • 2014-08-08
    • 1970-01-01
    相关资源
    最近更新 更多