简体   繁体   English

如何自定义iPhone SDK中的默认消息编写器?

[英]How to customize the default message composer in iphone sdk?

I need to customize the default message composer as at To: I need to diplay the recipient number and body contains an automatic message. 我需要在To:处自定义默认的消息编写器To:我需要显示收件人号码,并且正文中包含自动消息。
Can it possible to send this message without user interaction as he need not to be tap on to the send button. 无需用户交互即可发送此消息,因为他不需要点击发送按钮。

Thanks to all, Monish. 多亏了Monish。

The documentation for MFMessageComposeViewController shows that you can programmatically set the body and the recipients of a text message. MFMessageComposeViewController文档显示,您可以通过编程设置文本消息的bodyrecipients It does not, however, expose an API to send the message automatically. 但是,它没有公开API自动发送消息。 The framework requires user interaction. 该框架需要用户交互。

It would be a terrible thing if an app could send a text message without user intervention. 如果应用程序可以在没有用户干预的情况下发送短信,那将是一件可怕的事情。 If that were possible, then apps could fire off as many text messages as they wanted, to whomever they wanted, all while charges are getting applied to the user's cell phone bill. 如果可以的话,那么在向用户的手机账单收取费用的同时,应用可能会向用户发送任意数量的短信。 That's a lawsuit waiting to happen. 那是一场诉讼,等待发生。

So in a nutshell, you can pre-fill in some stuff, but the user will still have to tap the "Send" button. 简而言之,您可以预填充一些内容,但是用户仍然必须点击“发送”按钮。

No. You may add recipients and put what you like in the body of the message, but the user will always see the message and will be able to modify it. 不可以。您可以添加收件人并将您喜欢的内容放在邮件正文中,但是用户将始终看到该邮件并可以对其进行修改。 The user has to choose to send it. 用户必须选择发送它。

If you need to do this automatically, you'll need to implement enough of SMTP to be able to send messages on your own, without the help of the mail framework. 如果需要自动执行此操作,则需要实现足够的SMTP,以便能够在没有邮件框架帮助的情况下自行发送消息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM