私はアプリに取り組んでいて、stringValue
誰かが私のアプリからメールで何かを共有したいときに表示する変数として文字列を表示したかったのです。
- (IBAction)openMail:(id)sender {
if ([MFMailComposeViewController canSendMail])
{
MFMailComposeViewController *mailer = [[MFMailComposeViewController alloc] init];
mailer.mailComposeDelegate = self;
[mailer setSubject:@"My App"];
NSArray *toRecipients = [NSArray arrayWithObjects:@"tony@starkindustries.com", nil];
[mailer setToRecipients:toRecipients];
NSString *emailBody = [@"Rating is: %@", [self.app.rating stringValue];
[mailer setMessageBody:emailBody isHTML:NO];
[self presentModalViewController:mailer animated:YES];
}
メールを開いたときに[self.app.rating stringValue];
「Rating Is: some_number 」と表示されるようにするにはどうすればよいですか? もしかして私の書き方が%@
間違っているのでしょうか?どんな助けでも大歓迎です。前もって感謝します!