2 // IASKSettingsReader.h
3 // http://www.inappsettingskit.com
6 // Luc Vandal, Edovia Inc., http://www.edovia.com
7 // Ortwin Gentz, FutureTap GmbH, http://www.futuretap.com
8 // All rights reserved.
10 // It is appreciated but not required that you give credit to Luc Vandal and Ortwin Gentz,
11 // as the original authors of this code. You can give credit in a blog post, a tweet or on
12 // a info page of your app. Also, the original authors appreciate letting them know if you use this code.
14 // This code is licensed under the BSD license that is available at: http://www.opensource.org/licenses/bsd-license.php
17 #import <Foundation/Foundation.h>
19 #define kIASKPreferenceSpecifiers @"PreferenceSpecifiers"
20 #define kIASKType @"Type"
21 #define kIASKTitle @"Title"
22 #define kIASKKey @"Key"
23 #define kIASKFile @"File"
24 #define kIASKDefaultValue @"DefaultValue"
25 #define kIASKMinimumValue @"MinimumValue"
26 #define kIASKMaximumValue @"MaximumValue"
27 #define kIASKTrueValue @"TrueValue"
28 #define kIASKFalseValue @"FalseValue"
29 #define kIASKIsSecure @"IsSecure"
30 #define KIASKKeyboardType @"KeyboardType"
31 #define kIASKAutocapitalizationType @"AutocapitalizationType"
32 #define kIASKAutoCorrectionType @"AutocorrectionType"
33 #define kIASKValues @"Values"
34 #define kIASKTitles @"Titles"
35 #define kIASKKeyboardAlphabet @"Alphabet"
36 #define kIASKKeyboardNumbersAndPunctuation @"NumbersAndPunctuation"
37 #define kIASKKeyboardNumberPad @"NumberPad"
38 #define KIASKKeyboardURL @"URL"
39 #define kIASKKeyboardEmailAddress @"EmailAddress"
40 #define kIASKAutoCapNone @"None"
41 #define kIASKAutoCapSentences @"Sentences"
42 #define kIASKAutoCapWords @"Words"
43 #define kIASKAutoCapAllCharacters @"AllCharacters"
44 #define kIASKAutoCorrDefault @"Default"
45 #define kIASKAutoCorrNo @"No"
46 #define kIASKAutoCorrYes @"Yes"
47 #define kIASKMinimumValueImage @"MinimumValueImage"
48 #define kIASKMaximumValueImage @"MaximumValueImage"
50 #define kIASKPSGroupSpecifier @"PSGroupSpecifier"
51 #define kIASKPSToggleSwitchSpecifier @"PSToggleSwitchSpecifier"
52 #define kIASKPSMultiValueSpecifier @"PSMultiValueSpecifier"
53 #define kIASKPSSliderSpecifier @"PSSliderSpecifier"
54 #define kIASKPSTitleValueSpecifier @"PSTitleValueSpecifier"
55 #define kIASKPSTextFieldSpecifier @"PSTextFieldSpecifier"
56 #define kIASKPSChildPaneSpecifier @"PSChildPaneSpecifier"
57 #define kIASKOpenURLSpecifier @"IASKOpenURLSpecifier"
59 #define kIASKBundleFolder @"Settings.bundle"
60 #define kIASKBundleFolderAlt @"InAppSettings.bundle"
61 #define kIASKBundleFilename @"Root.plist"
63 #define kIASKAppSettingChanged @"kAppSettingChanged"
65 #define kIASKSectionHeaderIndex 0
67 #define kIASKSliderNoImagesX 21
68 #define kIASKSliderNoImagesWidth 278
69 #define kIASKSliderBothImagesX 53
70 #define kIASKSliderBothImagesWidth 214
71 #define kIASKSliderOneImageWidth 246
73 #define kIASKTableWidth 320
74 #define kIASKSpacing 5
75 #define kIASKMinLabelWidth 97
76 #define kIASKMinValueWidth 35
77 #define kIASKPaddingLeft 9
78 #define kIASKPaddingRight 10
80 #define kIASKLabelFontSize 17
84 @interface IASKSettingsReader : NSObject {
86 NSString *_bundleFolder;
87 NSDictionary *_settingsBundle;
92 - (id)initWithFile:(NSString*)file;
93 - (NSInteger)numberOfSections;
94 - (NSInteger)numberOfRowsForSection:(NSInteger)section;
95 - (IASKSpecifier*)specifierForIndexPath:(NSIndexPath*)indexPath;
96 - (IASKSpecifier*)specifierForKey:(NSString*)key;
97 - (NSString*)titleForSection:(NSInteger)section;
98 - (NSString*)titleForStringId:(NSString*)stringId;
99 - (NSString*)bundlePath;
100 - (NSString*)pathForImageNamed:(NSString*)image;
102 @property (nonatomic, retain) NSString *path;
103 @property (nonatomic, retain) NSString *bundleFolder;
104 @property (nonatomic, retain) NSDictionary *settingsBundle;
105 @property (nonatomic, retain) NSArray *dataSource;