如何将引号放在字符串中?

时间:2014-10-20 04:48:02

标签: objective-c nsstring

我是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;

1 个答案:

答案 0 :(得分:1)

使用此代码

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