获取用户输入的电子邮件地址

发布于 2024-08-25 14:51:01 字数 83 浏览 11 评论 0原文

是否可以获取用户输入的电子邮件地址?

我知道可以设置电子邮件地址,但没有方法获取电子邮件地址。

有什么已知的解决方案吗?

Is it possible to get the email address which the user has entered?

I know it's possible to set the email address but there is no method to get one.

Is there any know solution for that?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

难忘№最初的完美 2024-09-01 14:51:01

根据文档,没有。


我提到的其余内容是为了回答问题,但我不建议您这样做,因为这可能会让您的应用被商店拒绝。

MFMailComposeViewController 的设置方式可能是 toRecipients 在内部实现为 @property。如果是这种情况,您可能可以这样做:

NSArray * recipients = [myMailComposeViewController performSelector:@selector(toRecipients)];

如果这不起作用,您可能会开始寻找方法来内省 viewController 的 _internal ivar,或者可能只是自己遍历视图层次结构,直到找到你在寻找什么。

According to the documentation, there is not.


The remaining stuff I mention for the sake of answering the question, but I don't recommend that you do this, because it's likely to get your app rejected from the store.

It's possible that MFMailComposeViewController is set up in such a way that the toRecipients is implemented internally as an @property. If that's the case, you can probably do something like:

NSArray * recipients = [myMailComposeViewController performSelector:@selector(toRecipients)];

If that doesn't work, you could maybe start finding ways to introspect the viewController's _internal ivar, or maybe just walk the view hierarchy yourself until you find what you're looking for.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文