How to add button to settings.bundle?

后端 未结 3 1623
隐瞒了意图╮
隐瞒了意图╮ 2021-01-03 04:19

I\'m developing an iPhone app, and by default user keeps logged in. If he wants to logout, he should open the Settings and click a \"Logout\" button which would erase his da

3条回答
  •  忘掉有多难
    2021-01-03 04:38

    If you don't mind using the 3rd-party add-on "InAppSettingsKit" for your app's Settings, then it looks they would allow you to do what you need. I'm currently studying up on this myself, but from a quick scan through their documentation it looks like they would allow you to add buttons as well as completely custom child pane views: http://www.inappsettingskit.com/

    On that page, study the sections "IASKButtonSpecifier" and "Custom Viewcontrollers".

    I'll post a follow up here to let you know how this worked out for me. I'm using the InAppSettingsKit already, and love it so far.

    Download the code and sample app from Github: https://github.com/futuretap/InAppSettingsKit

    Then open the InAppSettingsKit.xcworkspace in your XCode and study how they implemented the various different types of Settings entries. They definitely support what you are looking for. It's really quite impressive.

    Erik

提交回复
热议问题