开发者

How to detect iPhone common settings?

I want to detect iPhone'开发者_开发知识库s common settings like settings about Mail, Contacts and Calendar.

How to detect iPhone common settings?

(source: simonblog.com)

I want to detect this Sort Order and Display Order settings for a native contact book application. Is this possible and how? Thanks in advance.


For the settings about the Adress Book, you can use the methods ABPersonGetSortOrdering() and ABPersonGetCompositeNameFormat() to get respectively the sort order and the display order. Read the AdressBook guide and the ABPerson class reference.

For mail, you can detect if the device is configured to send email with the class method canSendMail of the MFMailComposeViewController class. I am not aware of an API that give you more information than that. I doubt Apple would add one (and as a user, I prefer it this way).

For calendar, see this question: Programmatically add custom event in the iPhone Calendar

And for detecting the locale timezone, it's as simple as [NSTimeZone localTimeZone];. Again, I invite you to read the NSTimeZone class reference, to learn what you can do with this object.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜