简体   繁体   中英

ios - how to store mail contacts in an array

in my ios app when the user clicks a button it opens email part by which the user can send a common mail to all.

Now my question is whenever the user types an email address in the to: column i want the addresses to be stored automatically to an Array, so that the next time when the user clicks the to column i will be listing out the emails he have used so far.

I want to store the text typed there to an array.

how to do this, please help me friends

您可以将电子邮件添加到NSMutableArray中并将其保存在NSUserDefaults中,以备将来使用,每次用户输入电子邮件时,您都必须创建一个新的临时NSMutableArray,并使用NSUserDefaults的数组对其进行初始化,然后在其后附加最后一个条目,并通过替换最后一个值将其再次保存在NSUserDefault中。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM