Cocoa touch 添加格式字符串中的回车

Cocoa touch 添加格式字符串中的回车,cocoa-touch,email,string-formatting,Cocoa Touch,Email,String Formatting,我试图在电子邮件正文中的每个字符串之后获得回车。我画的是空白 这是我目前正在使用的代码: - (IBAction)mailButtonPressed { MFMailComposeViewController *controller = [[MFMailComposeViewController alloc] init]; controller.mailComposeDelegate = self; [controller setSubject:@"Pressed Dat

我试图在电子邮件正文中的每个字符串之后获得回车。我画的是空白

这是我目前正在使用的代码:

- (IBAction)mailButtonPressed {
    MFMailComposeViewController *controller = [[MFMailComposeViewController alloc] init];
    controller.mailComposeDelegate = self;
    [controller setSubject:@"Pressed Data..."];

    appDelegate= (TemplateIponeAppDelegate *)[UIApplication sharedApplication].delegate;

    NSString *MessageBody=[NSString stringWithFormat:@" Hi: %@ F Result: %d , R Result: %d , B Result: %d,  P Result: %d......... total Reults: %d   total time :%@",clientName.text, appDelegate.FCount,appDelegate.RCount,appDelegate.BCount,appDelegate.PCount,appDelegate.TotalPressed,appDelegate.time];

    [controller setMessageBody:MessageBody isHTML:NO];
    [self presentModalViewController:controller animated:YES];
    [controller release];
}

在格式字符串中添加一个
\n
,无论您想在哪里添加新行。

在格式字符串中添加一个
\n
,无论您想在哪里添加新行。

在电子邮件中,对于CR LF,它可能应该是
\r\n
。这里还有一个重要的键。。。因为我已经在网上找了一个小时了。它必须是isHTML:否。是的,它将删除\n。在电子邮件消息中,对于CR LF,它可能应该是
\r\n
。这里还有一个重要的键。。。因为我已经在网上找了一个小时了。必须是isHTML:否。是,它将删除\n。