Is it possible to dynamically alter an iphone app's settings page in the settings app?

早过忘川 提交于 2020-01-24 12:54:10

问题


For my iPhone app I'm working on, i want to have the ability to dynamically add or remove sections to the settings area for my app. ideally I'd like to be able to alter the list of options in a multi-value specifier, and also to add new rows that drilldown into copies of one settings page. I haven't seen anything in the apple documentation on this, but is it possible to alter the settings schema at all after compiling?


回答1:


As far as I know, you cannot do this through the SDK, because the application settings schema is based on a plist that is deployed at install time, and your application will not have access to that file at runtime, because of the sandbox.

As many people have noted, the Settings app really stops being useful for anything more than trivial settings. I would suggest adding a preferences section inside your application. But of course I'm not telling you anything useful. =)




回答2:


You can alter it. In X code, you have to create a new file and under Resource -> Settings Bundle and then go under ApplicationSettings ->Settings.bundle and edit the root.plist. It's that easy to start from. Connecting it to connect is another issue.



来源:https://stackoverflow.com/questions/702319/is-it-possible-to-dynamically-alter-an-iphone-apps-settings-page-in-the-setting

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!