Latest 0.1.0
Homepage https://github.com/pozi119/VOPreference
License MIT
Platforms ios 9.0
Authors

CI Status
Version
License
Platform

Feature

  • [x] Group header, group footer
  • [x] Text
  • [x] Multiple Values
  • [x] TextField
  • [x] ToggleSwitch
  • [x] Slider
  • [x] Button
  • [x] Stepper with value
  • [x] Date/Time Picker
  • [x] Segmented control
  • [x] Segmented Slider

Usage

  1. 使用XCode文件模板,添加setting.bundle
  2. 拷贝setting.bundle中的plist文件到项目中
  3. 使用代码创建并跳转设置页面,示例如下:
    NSString *path = [[NSBundle mainBundle] pathForResource:@"manual" ofType:@"plist"];
    VPSetting *setting = [[VPSetting alloc] initWithEntiresFile:path];
    VOPreferenceController *settingVC = [[VOPreferenceController alloc] init];
    settingVC.setting = setting;
    [self.navigationController pushViewController:settingVC animated:YES];

Note

默认使用 NSUserDefaults 保存配置, 也可以设置为其他方式保存.

    [setting setValueForEntryKey:^id(NSString * entryKey) {
        // load val for entryKey
    }];
    [setting setSetValueForEntryKey:^(NSString *  entryKey, id val) {
        // save val for entryKey
    }];

Requirements

Installation

VOPreference is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'VOPreference'

Author

pozi119, [email protected]

License

VOPreference is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "VOPreference",
    "version": "0.1.0",
    "summary": "A short description of VOPreference.",
    "description": "TODO: Add long description of the pod here.",
    "homepage": "https://github.com/pozi119/VOPreference",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "pozi119": "[email protected]"
    },
    "source": {
        "git": "https://github.com/pozi119/VOPreference.git",
        "tag": "0.1.0"
    },
    "platforms": {
        "ios": "9.0"
    },
    "source_files": "VOPreference/**/*"
}

Pin It on Pinterest

Share This