简单的利用xcode提供的Setting.bundle进行玩一个APP的导航栏颜色切换。
https://www.jianshu.com/p/27fe365202b4 Setting.bundle 不懂可参考这篇文章。
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>StringsTable</key>
<string>Root</string>
<key>PreferenceSpecifiers</key>
<array>
<dict>
<key>Type</key>
<string>PSTextFieldSpecifier</string>
<key>Title</key>
<string></string>
<key>Key</key>
<string></string>
</dict>
<dict>
<key>Type</key>
<string>PSGroupSpecifier</string>
<key>Title</key>
<string>个人信息</string>
<key>Key</key>
<string></string>
</dict>
<dict>
<key>Type</key>
<string>PSTextFieldSpecifier</string>
<key>Title</key>
<string>姓名</string>
<key>Key</key>
<string>username</string>
</dict>
<dict>
<key>Type</key>
<string>PSMultiValueSpecifier</string>
<key>Values</key>
<array>
<string>red</string>
<string>green</string>
<string>blue</string>
</array>
<key>Title</key>
<string>主题颜色</string>
<key>Titles</key>
<array>
<string>红色</string>
<string>蓝色</string>
<string>绿色</string>
</array>
<key>Key</key>
<string>theme</string>
<key>DefaultValue</key>
<string>red</string>
</dict>
<dict>
<key>FalseValue</key>
<string>NO</string>
<key>TrueValue</key>
<true/>
<key>DefaultValue</key>
<true/>
<key>Type</key>
<string>PSToggleSwitchSpecifier</string>
<key>Title</key>
<string>是否成年</string>
<key>Key</key>
<string>maritalStatus</string>
</dict>
<dict>
<key>Type</key>
<string>PSGroupSpecifier</string>
<key>Title</key>
<string>等级</string>
<key>Key</key>
<string></string>
</dict>
<dict>
<key>DefaultValue</key>
<integer>5</integer>
<key>MaximumValue</key>
<integer>10</integer>
<key>MinimumValue</key>
<integer>1</integer>
<key>Type</key>
<string>PSSliderSpecifier</string>
<key>Title</key>
<string>等级</string>
<key>Key</key>
<string>levelState</string>
</dict>
</array>
</dict>
</plist>