iPhone:如何在出现MFMessageComposeViewController时禁用编辑 [英] iPhone: How to disable editing when MFMessageComposeViewController shows up
问题描述
当MFMessageComposeViewController出现时是否可以防止编辑?
Is it possible to prevent editing when MFMessageComposeViewController shows up?
'因为我希望用户不能更改SMS的正文,并且我认为它仍然合法.
'Cause I want the body of SMS can't be changed by user and I think it's still legal.
请帮助!
推荐答案
在使用MFMessageComposeView时,用户没有最终决定权. 此外,在以下情况下,您的应用也禁止更改电子邮件的内容/收件人/正文: 查看幻灯片.
No the user has final say when using the MFMessageComposeView. Your app is also prohibited from changing the content/recipient/body of the email when the view slides up.
如果可以执行此操作,则可以轻松粘贴到其他收件人中,嗅探用户提供的内容等.(尤其是在Message App中,您可以交换电话号码并做一些糟糕的事情.). 我想这是背后的逻辑,您可以预先填充消息,但是用户可以从那里决定,直到取消"或发送"为止.
If you could do this it would be easy to paste in a different recipient, sniff the content provided by the user etc. etc. (especially in the Message App, you could swap the phone number and do terrible things.). I guess this is the logic behind, you get to pre-populate the message, but the user decides from there on and until "Cancel" or "Send".
您可能应该构建一个可以控制数据的Web服务 当它到达服务器并在电话上为其建立接口时.
You should probably build a web service where you have control over the data when it hits the server and make an interface for that on the phone.
这篇关于iPhone:如何在出现MFMessageComposeViewController时禁用编辑的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!