我想从我的手中打开。 “settings>>邮件>>添加帐户“ (添加帐户页面)是否可能。? [英] i want to open from my aap. "settings >> mail >> add account " (the add account page) is it possible.?
问题描述
在我的应用程序中,如果用户尚未在其iPhone上配置其电子邮件帐户,则当用户打开该应用程序时,它将要求进行电子邮件配置(表示该应用程序重定向到设置>>邮件> >添加帐户添加帐户页面,
In my app, if the user has not configured their E-mail account on their iPhone, then when the user opens the application, it will ask for e-mail configuration (means the app redirects to "settings >> mail >> add account " add account page),
我该怎么做?
我搜索并找到一个堆栈溢出中的类似问题,但它没有帮助。
就像这样问题
I searched and found one similar question in stack overflow but it was not helpful. just like this so question
推荐答案
只需查看官方示例代码。这是链接: SampleCode
just see the official sample code.Here is the link:SampleCode
找到launchMailAppOnDevice()函数。
find the launchMailAppOnDevice() function.
// Launches the Mail application on the device.
-(void)launchMailAppOnDevice
{
NSString *recipients = @"mailto:first@example.com?cc=second@example.com,third@example.com&subject=Hello from California!";
NSString *body = @"&body=It is raining in sunny California!";
NSString *email = [NSString stringWithFormat:@"%@%@", recipients, body];
email = [email stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:email]];
}
这对我有用。希望它可以帮到你。
It was useful for me. Hope it can help you.
这篇关于我想从我的手中打开。 “settings>>邮件>>添加帐户“ (添加帐户页面)是否可能。?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!