开发者

ios - how to store mail contacts in an array

开发者 https://www.devze.com 2023-03-23 00:40 出处:网络
inmy ios app when the user clicks a button it opens email part by which the user can send a common mail to all.

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 arr开发者_开发百科ay.

how to do this, please help me friends


you can add the emails in NSMutableArray and save it in NSUserDefaults for future, each time user enter email you have to create new temp NSMutableArray which init with NSUserDefaults's array then append last entry to it after that and save it again in NSUserDefault by replacing last value.

0

精彩评论

暂无评论...
验证码 换一张
取 消