How do I access the iPhone's settings from my code?
All I want to do is be able to tell whether or not a user of my app is using the 24-hour clock or not. I realize that I can't set these settings, I just want to read them. If you don't kno开发者_开发百科w what I'm talking about, I want to be able to read the values a user has set in the built-in "Settings" app of the iPhone. The one with the gray gears as the icon.
I tried googling a variety of searches that might provide an answer, but that didn't work. I tried looking through the documentation that Apple provides for xcode programmers, but that didn't turn anything up, either.
If you want this information in order to display a time, you don't need to query the Settings app. NSDateFormatter
will format the time according to the user's settings automatically.
精彩评论