次のコードで私を助けることができますか? iOSの中で電子メールを送信するために、以下のコードは、良いものですか私はこれよりMFMailComposeViewControllerが mailto:URLを使用して電子メールを送信する
NSString *url = [NSString stringWithString: @"mailto:[email protected][email protected]&subject=Greetings%20from%20Cupertino!&body=Wish%20you%20were%20here!"];
[[UIApplication sharedApplication] openURL: [NSURL URLWithString: url]];NSString *url = [NSString stringWithString: @"mailto:[email protected][email protected]&subject=Greetings%20from%20Cupertino!&body=Wish%20you%20were%20here!"];
[[UIApplication sharedApplication] openURL: [NSURL URLWithString: url]];
それはメールを送信するための信頼性の高いコードです
を?:使用する必要がありますか?
リテラル文字列で 'stringWithString:'を使う必要はありません。それはすでに文字列です。 (実際には 'stringWithString:'これを呼び出す理由はほとんどありません。) –