好房网

网站首页 楼盘 > 资讯 > 正文

iphone怎么发邮件(IOS发送电子邮件)

2022-06-06 12:05:03 资讯 来源:
导读 目前大家应该是对iphone怎么发邮件(IOS发送电子邮件)比较感兴趣的,所以今天好房网小编CC就来为大家整理了一些关于iphone怎么发邮件(IOS
目前大家应该是对iphone怎么发邮件(IOS发送电子邮件)比较感兴趣的,所以今天好房网小编CC就来为大家整理了一些关于iphone怎么发邮件(IOS发送电子邮件)方面的相关知识来分享给大家,希望大家会喜欢哦。

iphone怎么发邮件(IOS发送电子邮件)

简介

我们可以使用IOS设备中的电子邮件应用程序发送电子邮件。

实例步骤

创建一个简单的View based application

选择项目文件,然后选择目标,然后添加MessageUI.framework

在ViewController.xib中添加一个按钮,创建用于发送电子邮件的操作(action)

更新ViewController.h,如下所示

#import<UIKit/UIKit.h>#import<MessageUI/MessageUI.h>@interfaceViewController:UIViewController<MFMailComposeViewControllerDelegate>{MFMailComposeViewController*mailComposer;}-(IBAction)sendMail:(id)sender;@end

如下所示,更新ViewController.m

#import"ViewController.h"@interfaceViewController()@end@implementationViewController-(void)viewDidLoad{[superviewDidLoad];}-(void)didReceiveMemoryWarning{[superdidReceiveMemoryWarning];//Disposeofanyresourcesthatcanberecreated.}


版权说明: 本文由用户上传,如有侵权请联系删除!


标签: