简体   繁体   English

启动应用程序时如何从iPhone设置应用程序读取应用程序设置

[英]How to read the app settings (from iPhone Settings app) when app is launched

How can read the app settings when app is launched? 启动应用程序时如何读取应用程序设置? For instance, for some gaming application, you set the sound, vibration setting in iPhone Settings app. 例如,对于某些游戏应用程序,您可以在“ iPhone设置”应用程序中设置声音,振动设置。 So, how to read those settings when that gaming app is launched? 那么,在启动该游戏应用程序时如何读取这些设置?

They are set as a 'Settings.bundle'; 它们被设置为“ Settings.bundle”; the iOS Application Programming guide shows how to implement this in your app. iOS应用程序编程指南显示了如何在您的应用程序中实现此功能。

In your appDelegate, in the didFinishLaunching function, retrieve your settings. 在您的appDelegate中,在didFinishLaunching函数中,检索您的设置。 See User Defaults Documentation , particularly the information about NSUserDefaults. 请参阅用户默认值文档 ,特别是有关NSUserDefaults的信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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