iPhone:当 MFMessageComposeViewController 出现时如何禁用编辑
当 MFMessageComposeViewController 出现时是否可以阻止编辑?
因为我希望用户不能更改短信正文,并且我认为它仍然合法。
请帮忙!
Is it possible to prevent editing when MFMessageComposeViewController shows up?
'Cause I want the body of SMS can't be changed by user and I think it's still legal.
Please help!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不,用户在使用 MFMessageComposeView 时拥有最终决定权。
当以下情况发生时,您的应用程序也被禁止更改电子邮件的内容/收件人/正文:
视图向上滑动。
如果你能做到这一点,那么就很容易粘贴到不同的收件人,嗅探用户提供的内容等等(特别是在消息应用程序中,你可以交换电话号码并做出可怕的事情。)。
我想这就是背后的逻辑,您可以预先填充消息,但用户从那里决定直到“取消”或“发送”。
您可能应该构建一个可以控制数据的 Web 服务
当它到达服务器并在电话上为其创建一个接口时。
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.
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".
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.