1

我喜欢为我的应用程序制作一个表单,用户可以通过邮件向我报告错误。表单已准备好,但我无法将多个设置UITextfields为消息正文。

这是我的代码:

。H

IBOutlet UITextField *ios;

IBOutlet UITextField *iDevice;

IBOutlet UITextField *jailbreakstatus;

IBOutlet UITextField *otherstuff;

.m

MFMailComposeViewController *composer = [[MFMailComposeViewController alloc] init];

[composer setMailComposeDelegate:self];

if ([MFMailComposeViewController canSendMail]) {

    [composer setToRecipients:[NSArray arrayWithObjects:@"david.goelzhaeuser@me.com", nil]];

    [composer setSubject:@"Feedback"];

    [composer setMessageBody: ios.text,iDevice.text, jailbreakstatus.text, otherstuff.text isHTML:NO];

    [composer setModalTransitionStyle:UIModalTransitionStyleCoverVertical];

    [composer setModalPresentationStyle:UIModalPresentationFormSheet];

    [self presentModalViewController:composer animated:YES];
}

我已经在网上搜索了解决方案,但没有发现任何对我有帮助的东西。现在你是我唯一的希望:)

PS:是否有可能使它像这样:

UILable:UITextfield UILable:UITextfield UILable:UITextfield UILable:UITextfield

基本上是这样的:

iOS:6.0 iDevice:iPhone 4 越狱:没有其他东西:随机

你听得懂么?

4

2 回答 2

0
NSString *mBodyString = [NSSTring stringWithFormat:@"iOS:%@\n Device:%@\n Jailbreak:%@\n Other:%@",ios.text,iDevice.text,jailbreakstatus.text,otherstuff.text];

[composer setMessageBody:mBodyString isHTML:NO];
于 2012-10-20T12:14:22.540 回答
0

也可以这样

[composer setMessageBody: [NSString stringWithFormat:@"%@ \n%@ \n%@ \n%@",ios.text,iDevice.text, jailbreakstatus.text, otherstuff.text]isHTML:NO];
于 2012-10-20T12:15:29.780 回答