├── .gitignore ├── .hgignore ├── Gear.chopList ├── Gear.psd ├── Images ├── InAppSettings.png ├── ibadd.png ├── sourcetreeadd.png └── xcodeadd.png ├── InAppSettings.podspec ├── InAppSettings ├── InAppSettings.h ├── InAppSettings.m ├── InAppSettingsConstants.h ├── InAppSettingsPSChildPaneSpecifierCell.h ├── InAppSettingsPSChildPaneSpecifierCell.m ├── InAppSettingsPSMultiValueSpecifierCell.h ├── InAppSettingsPSMultiValueSpecifierCell.m ├── InAppSettingsPSMultiValueSpecifierTable.h ├── InAppSettingsPSMultiValueSpecifierTable.m ├── InAppSettingsPSSliderSpecifierCell.h ├── InAppSettingsPSSliderSpecifierCell.m ├── InAppSettingsPSTextFieldSpecifierCell.h ├── InAppSettingsPSTextFieldSpecifierCell.m ├── InAppSettingsPSTitleValueSpecifierCell.h ├── InAppSettingsPSTitleValueSpecifierCell.m ├── InAppSettingsPSToggleSwitchSpecifierCell.h ├── InAppSettingsPSToggleSwitchSpecifierCell.m ├── InAppSettingsReader.h ├── InAppSettingsReader.m ├── InAppSettingsSpecifier.h ├── InAppSettingsSpecifier.m ├── InAppSettingsTableCell.h └── InAppSettingsTableCell.m ├── InAppSettingsTestApp ├── Classes │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── RootViewController.h │ └── RootViewController.m ├── Default-568h@2x.png ├── InAppSettings.png ├── InAppSettings@2x.png ├── InAppSettingsTestApp-Info.plist ├── InAppSettingsTestApp.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── InAppSettingsTestApp.xccheckout │ └── xcuserdata │ │ └── keegan.xcuserdatad │ │ └── xcschemes │ │ ├── InAppSettingsTestApp.xcscheme │ │ └── xcschememanagement.plist ├── InAppSettingsTestApp_Prefix.pch ├── MainWindow.xib ├── RootViewController.xib ├── main.m ├── peter_settings │ └── Settings.bundle │ │ ├── Root.plist │ │ ├── en.lproj │ │ └── Root.strings │ │ └── vehicles.plist ├── pretty_settings │ └── Settings.bundle │ │ ├── Root.plist │ │ ├── en.lproj │ │ └── Root.strings │ │ ├── largefont.png │ │ ├── largefont@2x.png │ │ ├── smallfont.png │ │ └── smallfont@2x.png └── test_settings │ └── Settings.bundle │ ├── ChildPane.plist │ ├── InApp.plist │ ├── Root.plist │ ├── bigdot.png │ ├── bigdot@2x.png │ ├── en.lproj │ ├── ChildPane.strings │ ├── InApp.strings │ └── Root.strings │ ├── littledot.png │ └── littledot@2x.png ├── LICENSE └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | xcuserdata 3 | -------------------------------------------------------------------------------- /.hgignore: -------------------------------------------------------------------------------- 1 | syntax: glob 2 | *.orig 3 | *.rej 4 | *~ 5 | *.o 6 | tests/*.err 7 | .DS_Store 8 | build 9 | .svn 10 | (*) 11 | *.perspectivev3 12 | *.mode1v3 13 | *.mode2v3 14 | *.mpkg 15 | *.framework 16 | *.pbxuser 17 | xcuserdata 18 | 19 | syntax: regexp 20 | .*\#.*\#$ 21 | -------------------------------------------------------------------------------- /Gear.chopList: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | name 7 | Gear@2x 8 | extension 9 | 10 | x 11 | 0 12 | y 13 | 0 14 | width 15 | 50 16 | height 17 | 50 18 | 19 | 20 | name 21 | Gear 22 | extension 23 | 24 | x 25 | 50 26 | y 27 | 0 28 | width 29 | 26 30 | height 31 | 26 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /Gear.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kgn/InAppSettings/a7a9885df12d9ab575d9d093a640ca6d34b06f26/Gear.psd -------------------------------------------------------------------------------- /Images/InAppSettings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kgn/InAppSettings/a7a9885df12d9ab575d9d093a640ca6d34b06f26/Images/InAppSettings.png -------------------------------------------------------------------------------- /Images/ibadd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kgn/InAppSettings/a7a9885df12d9ab575d9d093a640ca6d34b06f26/Images/ibadd.png -------------------------------------------------------------------------------- /Images/sourcetreeadd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kgn/InAppSettings/a7a9885df12d9ab575d9d093a640ca6d34b06f26/Images/sourcetreeadd.png -------------------------------------------------------------------------------- /Images/xcodeadd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kgn/InAppSettings/a7a9885df12d9ab575d9d093a640ca6d34b06f26/Images/xcodeadd.png -------------------------------------------------------------------------------- /InAppSettings.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "InAppSettings" 3 | s.version = "1.0.0" 4 | s.license = "MIT" 5 | s.summary = "In-app display of Settings.bundle as it appears in the iPhone settings." 6 | s.homepage = "https://github.com/kgn/InAppSettings" 7 | s.screenshots = "https://raw.github.com/kgn/InAppSettings/master/screenshot.jpg" 8 | s.author = { "David Keegan" => "git@davidkeegan.com" } 9 | s.source = { :git => "https://github.com/kgn/InAppSettings.git", :tag => "v1.0.0" } 10 | s.ios.deployment_target = '5.0' 11 | s.requires_arc = true 12 | s.source_files = 'InAppSettings/*.{h,m}' 13 | end 14 | -------------------------------------------------------------------------------- /InAppSettings/InAppSettings.h: -------------------------------------------------------------------------------- 1 | // 2 | // InAppSettingsViewController.h 3 | // InAppSettings 4 | // 5 | // Created by David Keegan on 11/21/09. 6 | // Copyright 2009 InScopeApps{+}. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "InAppSettingsTableCell.h" 11 | #import "InAppSettingsReader.h" 12 | #import "InAppSettingsSpecifier.h" 13 | #import "InAppSettingsConstants.h" 14 | 15 | extern NSString *const InAppSettingsViewControllerDelegateWillDismissedNotification; 16 | extern NSString *const InAppSettingsViewControllerDelegateDidDismissedNotification; 17 | extern NSString *const InAppSettingsValueChangeNotification; 18 | extern NSString *const InAppSettingsTapNotification; 19 | 20 | @interface InAppSettings : NSObject 21 | 22 | + (void)registerDefaults; 23 | 24 | @end 25 | 26 | @interface InAppSettingsModalViewController : UINavigationController 27 | 28 | @end 29 | 30 | @interface InAppSettingsViewController : UIViewController 31 | 32 | @property (nonatomic, strong) NSString *file; 33 | @property (nonatomic, strong) UITableView *settingsTableView; 34 | @property (nonatomic, weak) UIControl *firstResponder; 35 | @property (nonatomic, strong) InAppSettingsReader *settingsReader; 36 | 37 | // modal view 38 | - (IBAction)dismissModalView:(id)sender; 39 | - (void)addDoneButton; 40 | 41 | //keyboard notification 42 | - (void)registerForKeyboardNotifications; 43 | - (void)keyboardWillShow:(NSNotification*)notification; 44 | - (void)keyboardWillHide:(NSNotification*)notification; 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /InAppSettings/InAppSettings.m: -------------------------------------------------------------------------------- 1 | // 2 | // InAppSettingsViewController.m 3 | // InAppSettings 4 | // 5 | // Created by David Keegan on 11/21/09. 6 | // Copyright 2009 InScopeApps{+}. All rights reserved. 7 | // 8 | 9 | #import "InAppSettings.h" 10 | #import "InAppSettingsPSMultiValueSpecifierTable.h" 11 | 12 | NSString *const InAppSettingsViewControllerDelegateWillDismissedNotification = @"InAppSettingsViewControllerDelegateWillDismissedNotification"; 13 | NSString *const InAppSettingsViewControllerDelegateDidDismissedNotification = @"InAppSettingsViewControllerDelegateDidDismissedNotification"; 14 | NSString *const InAppSettingsValueChangeNotification = @"InAppSettingsValueChangeNotification"; 15 | NSString *const InAppSettingsTapNotification = @"InAppSettingsTapNotification"; 16 | 17 | @implementation InAppSettings 18 | 19 | + (void)registerDefaults{ 20 | id __unused defaults = [[InAppSettingsReaderRegisterDefaults alloc] init]; 21 | } 22 | 23 | @end 24 | 25 | @implementation InAppSettingsModalViewController 26 | 27 | - (id)init{ 28 | InAppSettingsViewController *settings = [[InAppSettingsViewController alloc] init]; 29 | [settings addDoneButton]; 30 | return [[InAppSettingsModalViewController alloc] initWithRootViewController:settings]; 31 | } 32 | 33 | @end 34 | 35 | @implementation InAppSettingsViewController 36 | 37 | #pragma mark modal view 38 | 39 | - (IBAction)dismissModalView:(id)sender{ 40 | [[NSNotificationCenter defaultCenter] postNotificationName:InAppSettingsViewControllerDelegateWillDismissedNotification object:self]; 41 | [self.navigationController dismissViewControllerAnimated:YES completion:^{ 42 | [[NSNotificationCenter defaultCenter] postNotificationName:InAppSettingsViewControllerDelegateDidDismissedNotification object:self]; 43 | }]; 44 | } 45 | 46 | - (void)addDoneButton{ 47 | UIBarButtonItem *doneButton = 48 | [[UIBarButtonItem alloc] 49 | initWithBarButtonSystemItem:UIBarButtonSystemItemDone 50 | target:self 51 | action:@selector(dismissModalView:)]; 52 | self.navigationItem.rightBarButtonItem = doneButton; 53 | } 54 | 55 | #pragma mark setup view 56 | 57 | - (id)initWithFile:(NSString *)inputFile{ 58 | self = [super init]; 59 | if (self != nil){ 60 | self.file = inputFile; 61 | } 62 | return self; 63 | } 64 | 65 | - (void)viewDidLoad{ 66 | [super viewDidLoad]; 67 | 68 | //setup the table 69 | self.settingsTableView = [[UITableView alloc] initWithFrame:self.view.bounds style:UITableViewStyleGrouped]; 70 | self.settingsTableView.autoresizingMask = (UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight); 71 | self.settingsTableView.delegate = self; 72 | self.settingsTableView.dataSource = self; 73 | [self.view addSubview:self.settingsTableView]; 74 | 75 | //if the title is nil set it to Settings 76 | if(!self.title){ 77 | self.title = NSLocalizedString(@"Settings", nil); 78 | } 79 | 80 | //load settigns plist 81 | if(!self.file){ 82 | self.file = InAppSettingsRootFile; 83 | } 84 | 85 | self.settingsReader = [[InAppSettingsReader alloc] initWithFile:self.file]; 86 | 87 | //setup keyboard notification 88 | self.firstResponder = nil; 89 | [self registerForKeyboardNotifications]; 90 | } 91 | 92 | - (void)viewWillAppear:(BOOL)animated { 93 | [super viewWillAppear:animated]; 94 | 95 | self.firstResponder = nil; 96 | 97 | self.settingsTableView.contentInset = UIEdgeInsetsZero; 98 | self.settingsTableView.scrollIndicatorInsets = UIEdgeInsetsZero; 99 | 100 | [self.settingsTableView reloadData]; 101 | } 102 | 103 | - (void)viewWillDisappear:(BOOL)animated{ 104 | [super viewWillDisappear:animated]; 105 | self.firstResponder = nil; 106 | } 107 | 108 | - (void)dealloc{ 109 | self.firstResponder = nil; 110 | [[NSNotificationCenter defaultCenter] removeObserver:self]; 111 | } 112 | 113 | #pragma mark text field cell delegate 114 | 115 | - (void)textFieldDidBeginEditing:(UITextField *)cellTextField{ 116 | self.firstResponder = cellTextField; 117 | 118 | //TODO: find a better way to get the cell from the text view 119 | NSIndexPath *indexPath = [self.settingsTableView indexPathForCell:(UITableViewCell *)[[cellTextField superview] superview]]; 120 | [self.settingsTableView scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionMiddle animated:YES]; 121 | } 122 | 123 | - (BOOL)textFieldShouldReturn:(UITextField *)cellTextField{ 124 | self.firstResponder = nil; 125 | [cellTextField resignFirstResponder]; 126 | return YES; 127 | } 128 | 129 | #pragma mark keyboard notification 130 | 131 | // TODO: handle the case where the settings are in a popover or sheet modal 132 | // The offset amount will not be the same as on iPhone 133 | // Maybe bring in KGKeyboardChangeManager? 134 | 135 | - (void)registerForKeyboardNotifications{ 136 | [[NSNotificationCenter defaultCenter] 137 | addObserver:self selector:@selector(keyboardWillShow:) 138 | name:UIKeyboardWillShowNotification object:nil]; 139 | 140 | [[NSNotificationCenter defaultCenter] 141 | addObserver:self selector:@selector(keyboardWillHide:) 142 | name:UIKeyboardWillHideNotification object:nil]; 143 | } 144 | 145 | - (void)keyboardWillShow:(NSNotification*)notification{ 146 | if(self.firstResponder == nil){ 147 | CGRect keyboardEndFrame; 148 | NSTimeInterval animationDuration; 149 | UIViewAnimationCurve animationCurve; 150 | NSDictionary *userInfo = [notification userInfo]; 151 | [userInfo[UIKeyboardAnimationCurveUserInfoKey] getValue:&animationCurve]; 152 | [userInfo[UIKeyboardAnimationDurationUserInfoKey] getValue:&animationDuration]; 153 | [userInfo[UIKeyboardFrameEndUserInfoKey] getValue:&keyboardEndFrame]; 154 | 155 | UIEdgeInsets settingsTableInset = self.settingsTableView.contentInset; 156 | CGPoint tableViewScreenSpace = [self.settingsTableView.superview convertPoint:self.settingsTableView.frame.origin toView:nil]; 157 | CGFloat tableViewBottomOffset = CGRectGetHeight(self.view.bounds)-(tableViewScreenSpace.y+self.settingsTableView.frame.size.height); 158 | settingsTableInset.bottom = CGRectGetHeight(keyboardEndFrame)-tableViewBottomOffset; 159 | 160 | [UIView beginAnimations:nil context:nil]; 161 | [UIView setAnimationCurve:animationCurve]; 162 | [UIView setAnimationDuration:animationDuration]; 163 | [UIView setAnimationBeginsFromCurrentState:YES]; 164 | self.settingsTableView.contentInset = settingsTableInset; 165 | self.settingsTableView.scrollIndicatorInsets = settingsTableInset; 166 | [UIView commitAnimations]; 167 | } 168 | } 169 | 170 | - (void)keyboardWillHide:(NSNotification*)notification{ 171 | if(self.firstResponder == nil){ 172 | NSTimeInterval animationDuration; 173 | UIViewAnimationCurve animationCurve; 174 | NSDictionary *userInfo = [notification userInfo]; 175 | [userInfo[UIKeyboardAnimationCurveUserInfoKey] getValue:&animationCurve]; 176 | [userInfo[UIKeyboardAnimationDurationUserInfoKey] getValue:&animationDuration]; 177 | 178 | [UIView beginAnimations:nil context:nil]; 179 | [UIView setAnimationCurve:animationCurve]; 180 | [UIView setAnimationDuration:animationDuration]; 181 | [UIView setAnimationBeginsFromCurrentState:YES]; 182 | self.settingsTableView.contentInset = UIEdgeInsetsZero; 183 | self.settingsTableView.scrollIndicatorInsets = UIEdgeInsetsZero; 184 | [UIView commitAnimations]; 185 | } 186 | } 187 | 188 | #pragma mark Table view methods 189 | 190 | - (InAppSettingsSpecifier *)settingAtIndexPath:(NSIndexPath *)indexPath{ 191 | return [[self.settingsReader.settings objectAtIndex:indexPath.section] objectAtIndex:indexPath.row]; 192 | } 193 | 194 | - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{ 195 | return [self.settingsReader.headersAndFooters count]; 196 | } 197 | 198 | - (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section{ 199 | return [self.settingsReader.headersAndFooters objectAtIndex:section][0]; 200 | } 201 | 202 | - (NSString *)tableView:(UITableView *)tableView titleForFooterInSection:(NSInteger)section{ 203 | return [self.settingsReader.headersAndFooters objectAtIndex:section][1]; 204 | } 205 | 206 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ 207 | return [(NSArray *)[self.settingsReader.settings objectAtIndex:section] count]; 208 | } 209 | 210 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ 211 | InAppSettingsSpecifier *setting = [self settingAtIndexPath:indexPath]; 212 | 213 | //get the NSClass for a specifier, if there is none use the base class InAppSettingsTableCell 214 | NSString *cellType = [setting cellName]; 215 | Class nsclass = NSClassFromString(cellType); 216 | if(!nsclass){ 217 | cellType = @"InAppSettingsTableCell"; 218 | nsclass = NSClassFromString(cellType); 219 | } 220 | 221 | InAppSettingsTableCell *cell = ((InAppSettingsTableCell *)[tableView dequeueReusableCellWithIdentifier:cellType]); 222 | if (cell == nil){ 223 | cell = [[nsclass alloc] initWithReuseIdentifier:cellType]; 224 | //setup the cells controlls 225 | [cell setupCell]; 226 | } 227 | 228 | //set the values of the cell, this is separated from setupCell for reloading the table 229 | cell.setting = setting; 230 | [cell setValueDelegate:self]; 231 | [cell setUIValues]; 232 | 233 | return cell; 234 | } 235 | 236 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ 237 | InAppSettingsSpecifier *setting = [self settingAtIndexPath:indexPath]; 238 | if([setting isType:InAppSettingsPSMultiValueSpecifier]){ 239 | InAppSettingsPSMultiValueSpecifierTable *multiValueSpecifier = [[InAppSettingsPSMultiValueSpecifierTable alloc] initWithSetting:setting]; 240 | [self.navigationController pushViewController:multiValueSpecifier animated:YES]; 241 | }else if([setting isType:InAppSettingsPSChildPaneSpecifier]){ 242 | InAppSettingsViewController *childPane = [[InAppSettingsViewController alloc] initWithFile:[setting valueForKey:InAppSettingsSpecifierFile]]; 243 | childPane.title = [setting localizedTitle]; 244 | [self.navigationController pushViewController:childPane animated:YES]; 245 | }else if([setting isType:InAppSettingsPSTitleValueSpecifier]){ 246 | NSString *InAppURL = [setting valueForKey:InAppSettingsSpecifierInAppURL]; 247 | NSString *InAppTwitter = [setting valueForKey:InAppSettingsSpecifierInAppTwitter]; 248 | if(InAppURL){ 249 | [[UIApplication sharedApplication] openURL:[NSURL URLWithString:InAppURL]]; 250 | }else if(InAppTwitter){ 251 | if([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"twitter:"]]){ 252 | [[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"twitter://user?screen_name=%@", InAppTwitter]]]; 253 | }else{ 254 | [[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://twitter.com/%@", InAppTwitter]]]; 255 | } 256 | } 257 | [tableView deselectRowAtIndexPath:indexPath animated:YES]; 258 | } 259 | } 260 | 261 | - (NSIndexPath *)tableView:(UITableView *)tableView willSelectRowAtIndexPath:(NSIndexPath *)indexPath{ 262 | InAppSettingsTableCell *cell = ((InAppSettingsTableCell *)[tableView cellForRowAtIndexPath:indexPath]); 263 | 264 | if([cell.setting isType:@"PSTextFieldSpecifier"]){ 265 | [cell.valueInput becomeFirstResponder]; 266 | }else if(cell.canSelectCell){ 267 | [self.firstResponder resignFirstResponder]; 268 | return indexPath; 269 | } 270 | return nil; 271 | } 272 | 273 | @end 274 | -------------------------------------------------------------------------------- /InAppSettings/InAppSettingsConstants.h: -------------------------------------------------------------------------------- 1 | // 2 | // InAppSettingsConstants.h 3 | // InAppSettingsTestApp 4 | // 5 | // Created by David Keegan on 11/21/09. 6 | // Copyright 2009 InScopeApps{+}. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #define InAppSettingsRootFile @"Root" 12 | #define InAppSettingsProjectName @"InAppSettings" 13 | 14 | #define InAppSettingsFontSize 17.0f 15 | #define InAppSettingsCellPadding 9.0f 16 | #define InAppSettingsTablePadding 10.0f 17 | #define InAppSettingsCellTextFieldMinX 115.0f 18 | #define InAppSettingsCellToggleSwitchWidth 94.0f 19 | #define InAppSettingsTotalCellPadding InAppSettingsCellPadding*2 20 | #define InAppSettingsTotalTablePadding InAppSettingsTablePadding*2 21 | #define InAppSettingsCellTitleMaxWidth CGRectGetWidth(self.bounds)-(InAppSettingsTotalTablePadding+InAppSettingsTotalCellPadding) 22 | #define InAppSettingsBoldFont [UIFont boldSystemFontOfSize:InAppSettingsFontSize] 23 | #define InAppSettingsNormalFont [UIFont systemFontOfSize:InAppSettingsFontSize] 24 | #define InAppSettingsBlue [UIColor grayColor]; 25 | 26 | #define InAppSettingsBundlePath [[NSBundle mainBundle] pathForResource:@"Settings" ofType:@"bundle"] 27 | #define InAppSettingsFullPlistPath(file) \ 28 | [InAppSettingsBundlePath stringByAppendingPathComponent:[file stringByAppendingPathExtension:@"plist"]] 29 | #define InAppSettingsLocalize(stringKey, tableKey) \ 30 | [[NSBundle bundleWithPath:InAppSettingsBundlePath] localizedStringForKey:stringKey value:stringKey table:tableKey] 31 | 32 | // settings strings 33 | #define InAppSettingsStringsTable @"StringsTable" 34 | #define InAppSettingsPreferenceSpecifiers @"PreferenceSpecifiers" 35 | 36 | #define InAppSettingsPSGroupSpecifier @"PSGroupSpecifier" 37 | #define InAppSettingsPSSliderSpecifier @"PSSliderSpecifier" 38 | #define InAppSettingsPSChildPaneSpecifier @"PSChildPaneSpecifier" 39 | #define InAppSettingsPSTextFieldSpecifier @"PSTextFieldSpecifier" 40 | #define InAppSettingsPSTitleValueSpecifier @"PSTitleValueSpecifier" 41 | #define InAppSettingsPSMultiValueSpecifier @"PSMultiValueSpecifier" 42 | #define InAppSettingsPSToggleSwitchSpecifier @"PSToggleSwitchSpecifier" 43 | 44 | #define InAppSettingsSpecifierKey @"Key" 45 | #define InAppSettingsSpecifierType @"Type" 46 | #define InAppSettingsSpecifierFile @"File" 47 | #define InAppSettingsSpecifierTitle @"Title" 48 | #define InAppSettingsSpecifierFooterText @"FooterText" 49 | #define InAppSettingsSpecifierTitles @"Titles" 50 | #define InAppSettingsSpecifierValues @"Values" 51 | #define InAppSettingsSpecifierDefaultValue @"DefaultValue" 52 | #define InAppSettingsSpecifierMinimumValue @"MinimumValue" 53 | #define InAppSettingsSpecifierMaximumValue @"MaximumValue" 54 | #define InAppSettingsSpecifierInAppURL @"InAppURL" 55 | #define InAppSettingsSpecifierInAppTwitter @"InAppTwitter" 56 | #define InAppSettingsSpecifierInAppTitle @"InAppTitle" 57 | #define InAppSettingsSpecifierInAppMultiType @"InAppMultiType" 58 | #define InAppSettingsSpecifierTap @"InAppTap" 59 | 60 | // test if the value of PSMultiValueSpecifier should be on the right or left if there is no title 61 | #define InAppSettingsUseNewMultiValueLocation [[[UIDevice currentDevice] systemVersion] doubleValue] >= 4.0 62 | -------------------------------------------------------------------------------- /InAppSettings/InAppSettingsPSChildPaneSpecifierCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // PSChildPaneSpecifierCell.h 3 | // InAppSettingsTestApp 4 | // 5 | // Created by David Keegan on 11/21/09. 6 | // Copyright 2009 InScopeApps{+}. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "InAppSettingsTableCell.h" 11 | 12 | @interface InAppSettingsPSChildPaneSpecifierCell : InAppSettingsTableCell 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /InAppSettings/InAppSettingsPSChildPaneSpecifierCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // PSToggleSwitchSpecifier.m 3 | // InAppSettingsTestApp 4 | // 5 | // Created by David Keegan on 11/21/09. 6 | // Copyright 2009 InScopeApps{+}. All rights reserved. 7 | // 8 | 9 | #import "InAppSettingsPSChildPaneSpecifierCell.h" 10 | #import "InAppSettingsConstants.h" 11 | 12 | @implementation InAppSettingsPSChildPaneSpecifierCell 13 | 14 | - (void)setUIValues{ 15 | [super setUIValues]; 16 | 17 | [self setTitle]; 18 | } 19 | 20 | - (void)setupCell{ 21 | [super setupCell]; 22 | 23 | [self setDisclosure:YES]; 24 | self.canSelectCell = YES; 25 | } 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /InAppSettings/InAppSettingsPSMultiValueSpecifierCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // PSToggleSwitchSpecifier.h 3 | // InAppSettingsTestApp 4 | // 5 | // Created by David Keegan on 11/21/09. 6 | // Copyright 2009 InScopeApps{+}. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "InAppSettingsTableCell.h" 11 | 12 | @interface InAppSettingsPSMultiValueSpecifierCell : InAppSettingsTableCell 13 | 14 | - (NSString *)getValueTitle; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /InAppSettings/InAppSettingsPSMultiValueSpecifierCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // PSToggleSwitchSpecifier.m 3 | // InAppSettingsTestApp 4 | // 5 | // Created by David Keegan on 11/21/09. 6 | // Copyright 2009 InScopeApps{+}. All rights reserved. 7 | // 8 | 9 | #import "InAppSettingsPSMultiValueSpecifierCell.h" 10 | #import "InAppSettingsConstants.h" 11 | 12 | @implementation InAppSettingsPSMultiValueSpecifierCell 13 | 14 | - (NSString *)getValueTitle{ 15 | NSArray *titles = [self.setting valueForKey:InAppSettingsSpecifierTitles]; 16 | NSArray *values = [self.setting valueForKey:InAppSettingsSpecifierValues]; 17 | NSInteger valueIndex = [values indexOfObject:[self.setting getValue]]; 18 | if((valueIndex >= 0) && (valueIndex < (NSInteger)[titles count])){ 19 | return InAppSettingsLocalize([titles objectAtIndex:valueIndex], self.setting.stringsTable); 20 | } 21 | return nil; 22 | } 23 | 24 | - (void)setUIValues{ 25 | [super setUIValues]; 26 | 27 | [self setTitle]; 28 | [self setDetail:[self getValueTitle]]; 29 | 30 | if([[self.setting valueForKey:InAppSettingsSpecifierInAppMultiType] isEqualToString:@"fonts"]){ 31 | NSString *cellValue = [self.setting getValue]; 32 | if([cellValue isEqualToString:@"system"]){ 33 | self.valueLabel.font = [UIFont systemFontOfSize:InAppSettingsFontSize]; 34 | }else{ 35 | self.valueLabel.font = [UIFont fontWithName:cellValue size:InAppSettingsFontSize]; 36 | } 37 | } 38 | } 39 | 40 | - (void)setupCell{ 41 | [super setupCell]; 42 | 43 | [self setDisclosure:YES]; 44 | self.canSelectCell = YES; 45 | } 46 | 47 | @end 48 | -------------------------------------------------------------------------------- /InAppSettings/InAppSettingsPSMultiValueSpecifierTable.h: -------------------------------------------------------------------------------- 1 | // 2 | // PSMultiValueSpecifierTable.h 3 | // InAppSettings 4 | // 5 | // Created by David Keegan on 11/3/09. 6 | // Copyright 2009 InScopeApps{+}. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "InAppSettingsSpecifier.h" 11 | 12 | @interface InAppSettingsPSMultiValueSpecifierTable : UITableViewController 13 | 14 | @property (nonatomic, strong) InAppSettingsSpecifier *setting; 15 | 16 | - (id)initWithSetting:(InAppSettingsSpecifier *)inputSetting; 17 | - (id)getValue; 18 | - (void)setValue:(id)newValue; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /InAppSettings/InAppSettingsPSMultiValueSpecifierTable.m: -------------------------------------------------------------------------------- 1 | // 2 | // PSMultiValueSpecifierTable.m 3 | // InAppSettings 4 | // 5 | // Created by David Keegan on 11/3/09. 6 | // Copyright 2009 InScopeApps{+}. All rights reserved. 7 | // 8 | 9 | #import "InAppSettingsPSMultiValueSpecifierTable.h" 10 | #import "InAppSettingsConstants.h" 11 | 12 | @implementation InAppSettingsPSMultiValueSpecifierTable 13 | 14 | - (id)initWithStyle:(UITableViewStyle)style{ 15 | return [super initWithStyle:UITableViewStyleGrouped]; 16 | } 17 | 18 | - (id)initWithSetting:(InAppSettingsSpecifier *)inputSetting{ 19 | self = [super init]; 20 | if (self != nil){ 21 | self.setting = inputSetting; 22 | } 23 | return self; 24 | } 25 | 26 | - (void)viewDidLoad{ 27 | [super viewDidLoad]; 28 | 29 | self.title = [self.setting localizedTitle]; 30 | } 31 | 32 | 33 | #pragma mark Value 34 | 35 | - (id)getValue{ 36 | id value = [[NSUserDefaults standardUserDefaults] valueForKey:[self.setting getKey]]; 37 | if(value == nil){ 38 | value = [self.setting valueForKey:InAppSettingsSpecifierDefaultValue]; 39 | } 40 | return value; 41 | } 42 | 43 | - (void)setValue:(id)newValue{ 44 | [self.setting setValue:newValue]; 45 | } 46 | 47 | #pragma mark Table view methods 48 | 49 | - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{ 50 | return 1; 51 | } 52 | 53 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ 54 | return [(NSArray *)[self.setting valueForKey:InAppSettingsSpecifierValues] count]; 55 | } 56 | 57 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ 58 | static NSString *CellIdentifier = @"PSMultiValueSpecifierTableCell"; 59 | 60 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; 61 | if (cell == nil){ 62 | cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier]; 63 | } 64 | 65 | NSString *cellTitle = InAppSettingsLocalize([[self.setting valueForKey:InAppSettingsSpecifierTitles] objectAtIndex:indexPath.row], self.setting.stringsTable); 66 | id cellValue = [[self.setting valueForKey:InAppSettingsSpecifierValues] objectAtIndex:indexPath.row]; 67 | cell.textLabel.text = cellTitle; 68 | if([[self.setting valueForKey:InAppSettingsSpecifierInAppMultiType] isEqualToString:@"fonts"]){ 69 | if([cellValue isEqualToString:@"system"]){ 70 | cell.textLabel.font = [UIFont systemFontOfSize:InAppSettingsFontSize]; 71 | }else{ 72 | cell.textLabel.font = [UIFont fontWithName:cellValue size:InAppSettingsFontSize]; 73 | } 74 | } 75 | if([cellValue isEqual:[self getValue]]){ 76 | cell.accessoryType = UITableViewCellAccessoryCheckmark; 77 | cell.textLabel.textColor = InAppSettingsBlue; 78 | } 79 | else{ 80 | cell.accessoryType = UITableViewCellAccessoryNone; 81 | cell.textLabel.textColor = [UIColor blackColor]; 82 | } 83 | 84 | return cell; 85 | } 86 | 87 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ 88 | [tableView deselectRowAtIndexPath:[tableView indexPathForSelectedRow] animated:YES]; 89 | } 90 | 91 | - (NSIndexPath *)tableView:(UITableView *)tableView willSelectRowAtIndexPath:(NSIndexPath *)indexPath{ 92 | id cellValue = [[self.setting valueForKey:InAppSettingsSpecifierValues] objectAtIndex:indexPath.row]; 93 | [self setValue:cellValue]; 94 | [self.tableView reloadData]; 95 | return indexPath; 96 | } 97 | 98 | @end 99 | 100 | -------------------------------------------------------------------------------- /InAppSettings/InAppSettingsPSSliderSpecifierCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // PSToggleSwitchSpecifier.h 3 | // InAppSettingsTestApp 4 | // 5 | // Created by David Keegan on 11/21/09. 6 | // Copyright 2009 InScopeApps{+}. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "InAppSettingsTableCell.h" 11 | 12 | @interface InAppSettingsPSSliderSpecifierCell : InAppSettingsTableCell 13 | 14 | @property (nonatomic, strong) UISlider *valueSlider; 15 | 16 | - (void)slideAction; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /InAppSettings/InAppSettingsPSSliderSpecifierCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // PSToggleSwitchSpecifier.m 3 | // InAppSettingsTestApp 4 | // 5 | // Created by David Keegan on 11/21/09. 6 | // Copyright 2009 InScopeApps{+}. All rights reserved. 7 | // 8 | 9 | #import "InAppSettingsPSSliderSpecifierCell.h" 10 | #import "InAppSettingsConstants.h" 11 | 12 | @implementation InAppSettingsPSSliderSpecifierCell 13 | 14 | - (NSString *)resolutionIndependentImagePath:(NSString *)path{ 15 | if([UIScreen instancesRespondToSelector:@selector(scale)] && [[UIScreen mainScreen] scale] == 2.0f){ 16 | NSString *extension = [path pathExtension]; 17 | if([extension length] == 0){ 18 | extension = @"png"; 19 | } 20 | NSString *path2x = [[path stringByDeletingLastPathComponent] 21 | stringByAppendingPathComponent:[NSString stringWithFormat:@"%@@2x.%@", 22 | [[path lastPathComponent] stringByDeletingPathExtension], 23 | extension]]; 24 | 25 | if([[NSFileManager defaultManager] fileExistsAtPath:path2x]){ 26 | return path2x; 27 | } 28 | } 29 | 30 | NSString *extension = [path pathExtension]; 31 | if([extension length] == 0){ 32 | return [NSString stringWithFormat:@"%@.png", path]; 33 | } 34 | 35 | return path; 36 | } 37 | 38 | #pragma mark - 39 | 40 | - (void)slideAction{ 41 | [self.setting setValue:[NSNumber numberWithFloat:[self.valueSlider value]]]; 42 | } 43 | 44 | - (void)setUIValues{ 45 | [super setUIValues]; 46 | 47 | //get the abolute path to the images 48 | NSString *minImagePath = [self resolutionIndependentImagePath:[InAppSettingsBundlePath stringByAppendingPathComponent:[self.setting valueForKey:@"MinimumValueImage"]]]; 49 | NSString *maxImagePath = [self resolutionIndependentImagePath:[InAppSettingsBundlePath stringByAppendingPathComponent:[self.setting valueForKey:@"MaximumValueImage"]] ]; 50 | 51 | //setup the slider 52 | self.valueSlider.minimumValue = [[self.setting valueForKey:InAppSettingsSpecifierMinimumValue] floatValue]; 53 | self.valueSlider.maximumValue = [[self.setting valueForKey:InAppSettingsSpecifierMaximumValue] floatValue]; 54 | self.valueSlider.minimumValueImage = [UIImage imageWithContentsOfFile:minImagePath]; 55 | self.valueSlider.maximumValueImage = [UIImage imageWithContentsOfFile:maxImagePath]; 56 | CGRect valueSliderFrame = self.valueSlider.frame; 57 | valueSliderFrame.origin.x = InAppSettingsCellPadding; 58 | valueSliderFrame.size.width = CGRectGetWidth(self.contentView.bounds)-InAppSettingsCellPadding*2; 59 | valueSliderFrame.origin.y = (CGFloat)round(CGRectGetMidY(self.contentView.bounds)-round(valueSliderFrame.size.height*0.5)); 60 | self.valueSlider.frame = valueSliderFrame; 61 | 62 | self.valueSlider.value = [[self.setting getValue] floatValue]; 63 | } 64 | 65 | - (void)setupCell{ 66 | [super setupCell]; 67 | 68 | //create the slider 69 | self.valueSlider = [[UISlider alloc] initWithFrame:CGRectMake(0, 0, 36, 36)]; //Fix required for iOS7 70 | self.valueSlider.autoresizingMask = UIViewAutoresizingFlexibleWidth; 71 | [self.valueSlider addTarget:self action:@selector(slideAction) forControlEvents:UIControlEventTouchUpInside+UIControlEventTouchUpOutside]; 72 | [self.contentView addSubview:self.valueSlider]; 73 | } 74 | 75 | 76 | @end 77 | -------------------------------------------------------------------------------- /InAppSettings/InAppSettingsPSTextFieldSpecifierCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // PSToggleSwitchSpecifier.h 3 | // InAppSettingsTestApp 4 | // 5 | // Created by David Keegan on 11/21/09. 6 | // Copyright 2009 InScopeApps{+}. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "InAppSettingsTableCell.h" 11 | 12 | @interface InAppSettingsPSTextFieldSpecifierCell : InAppSettingsTableCell 13 | 14 | @property (nonatomic, strong) UITextField *textField; 15 | 16 | - (BOOL)isSecure; 17 | - (UIKeyboardType)getKeyboardType; 18 | - (UITextAutocapitalizationType)getAutocapitalizationType; 19 | - (UITextAutocorrectionType)getAutocorrectionType; 20 | - (void)textChangeAction; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /InAppSettings/InAppSettingsPSTextFieldSpecifierCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // PSToggleSwitchSpecifier.m 3 | // InAppSettingsTestApp 4 | // 5 | // Created by David Keegan on 11/21/09. 6 | // Copyright 2009 InScopeApps{+}. All rights reserved. 7 | // 8 | 9 | #import "InAppSettingsPSTextFieldSpecifierCell.h" 10 | #import "InAppSettingsConstants.h" 11 | 12 | @implementation InAppSettingsPSTextFieldSpecifierCell 13 | 14 | #pragma mark helper methods 15 | 16 | - (BOOL)isSecure{ 17 | NSNumber *isSecure = [self.setting valueForKey:@"IsSecure"]; 18 | if(!isSecure){ 19 | return NO; 20 | } 21 | return [isSecure boolValue]; 22 | } 23 | 24 | - (UIKeyboardType)getKeyboardType{ 25 | NSString *keyboardType = [self.setting valueForKey:@"KeyboardType"]; 26 | if([keyboardType isEqualToString:@"NumbersAndPunctuation"]){ 27 | return UIKeyboardTypeNumbersAndPunctuation; 28 | } 29 | else if([keyboardType isEqualToString:@"NumberPad"]){ 30 | return UIKeyboardTypeNumberPad; 31 | } 32 | else if([keyboardType isEqualToString:@"URL"]){ 33 | return UIKeyboardTypeURL; 34 | } 35 | else if([keyboardType isEqualToString:@"EmailAddress"]){ 36 | return UIKeyboardTypeEmailAddress; 37 | } 38 | 39 | return UIKeyboardTypeAlphabet; 40 | } 41 | 42 | - (UITextAutocapitalizationType)getAutocapitalizationType{ 43 | NSString *autocapitalizationType = [self.setting valueForKey:@"AutocapitalizationType"]; 44 | if([autocapitalizationType isEqualToString:@"Words"]){ 45 | return UITextAutocapitalizationTypeWords; 46 | } 47 | else if([autocapitalizationType isEqualToString:@"Sentences"]){ 48 | return UITextAutocapitalizationTypeSentences; 49 | } 50 | else if([autocapitalizationType isEqualToString:@"AllCharacters"]){ 51 | return UITextAutocapitalizationTypeAllCharacters; 52 | } 53 | return UITextAutocapitalizationTypeNone; 54 | } 55 | 56 | - (UITextAutocorrectionType)getAutocorrectionType{ 57 | NSString *autocorrectionType = [self.setting valueForKey:@"AutocorrectionType"]; 58 | if([autocorrectionType isEqualToString:@"Yes"]){ 59 | return UITextAutocorrectionTypeYes; 60 | } 61 | else if([autocorrectionType isEqualToString:@"No"]){ 62 | return UITextAutocorrectionTypeNo; 63 | } 64 | return UITextAutocorrectionTypeDefault; 65 | } 66 | 67 | - (void)textChangeAction{ 68 | [self.setting setValue:self.textField.text]; 69 | } 70 | 71 | #pragma mark cell controlls 72 | 73 | - (void)setValueDelegate:(id)delegate{ 74 | self.textField.delegate = delegate; 75 | [super setValueDelegate:delegate]; 76 | } 77 | 78 | - (void)setUIValues{ 79 | [super setUIValues]; 80 | 81 | [self setTitle]; 82 | 83 | CGRect textFieldFrame = self.textField.frame; 84 | //iOS7: Updating sizeWithFont (depreciated) to sizeWithAttributes 85 | #if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 86 | CGSize titleSize = [self.titleLabel.text sizeWithAttributes: 87 | @{NSFontAttributeName:[UIFont systemFontOfSize:InAppSettingsFontSize]}]; 88 | #else 89 | CGSize titleSize = [self.titleLabel.text sizeWithFont:self.titleLabel.font]; 90 | #endif 91 | 92 | textFieldFrame.origin.x = (CGFloat)round(titleSize.width+InAppSettingsTotalTablePadding); 93 | if(textFieldFrame.origin.x < InAppSettingsCellTextFieldMinX){ 94 | textFieldFrame.origin.x = InAppSettingsCellTextFieldMinX; 95 | } 96 | textFieldFrame.origin.y = (CGFloat)round(CGRectGetMidY(self.contentView.bounds)-(titleSize.height*0.5f)); 97 | textFieldFrame.size.width = (CGFloat)round((CGRectGetWidth(self.bounds)-(InAppSettingsTotalTablePadding+InAppSettingsCellPadding))-textFieldFrame.origin.x); 98 | textFieldFrame.size.height = titleSize.height; 99 | self.textField.frame = textFieldFrame; 100 | self.textField.text = [self.setting getValue]; 101 | 102 | //keyboard traits 103 | self.textField.secureTextEntry = [self isSecure]; 104 | self.textField.keyboardType = [self getKeyboardType]; 105 | self.textField.autocapitalizationType = [self getAutocapitalizationType]; 106 | self.textField.autocorrectionType = [self getAutocorrectionType]; 107 | 108 | //these are set here so they are set per cell 109 | self.valueInput = self.textField; 110 | } 111 | 112 | - (void)setupCell{ 113 | [super setupCell]; 114 | 115 | //create text field 116 | self.textField = [[UITextField alloc] initWithFrame:CGRectZero]; 117 | self.textField.textColor = InAppSettingsBlue; 118 | self.textField.adjustsFontSizeToFitWidth = YES; 119 | self.textField.autoresizingMask = UIViewAutoresizingFlexibleWidth; 120 | 121 | //THIS IS NOT THE BEHAVIOR OF THE SETTINGS APP 122 | //but we need a way to dismiss the keyboard 123 | self.textField.returnKeyType = UIReturnKeyDone; 124 | 125 | [self.textField addTarget:self action:@selector(textChangeAction) forControlEvents:UIControlEventEditingChanged]; 126 | [self.contentView addSubview:self.textField]; 127 | } 128 | 129 | 130 | @end 131 | -------------------------------------------------------------------------------- /InAppSettings/InAppSettingsPSTitleValueSpecifierCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // PSTitleValueSpecifierCell.h 3 | // InAppSettingsTestApp 4 | // 5 | // Created by David Keegan on 11/21/09. 6 | // Copyright 2009 InScopeApps{+}. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "InAppSettingsTableCell.h" 11 | 12 | @interface InAppSettingsPSTitleValueSpecifierCell : InAppSettingsTableCell 13 | 14 | - (NSString *)getValueTitle; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /InAppSettings/InAppSettingsPSTitleValueSpecifierCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // PSTitleValueSpecifierCell.m 3 | // InAppSettingsTestApp 4 | // 5 | // Created by David Keegan on 11/21/09. 6 | // Copyright 2009 InScopeApps{+}. All rights reserved. 7 | // 8 | 9 | #import "InAppSettingsPSTitleValueSpecifierCell.h" 10 | #import "InAppSettingsConstants.h" 11 | 12 | @implementation InAppSettingsPSTitleValueSpecifierCell 13 | 14 | - (NSString *)getValueTitle{ 15 | NSArray *titles = [self.setting valueForKey:InAppSettingsSpecifierTitles]; 16 | NSArray *values = [self.setting valueForKey:InAppSettingsSpecifierValues]; 17 | if(titles || values){ 18 | if(([titles count] == 0) || ([values count] == 0) || ([titles count] != [values count])){ 19 | return nil; 20 | } 21 | NSInteger valueIndex = [values indexOfObject:[self.setting getValue]]; 22 | if((valueIndex >= 0) && (valueIndex < (NSInteger)[titles count])){ 23 | return [titles objectAtIndex:valueIndex]; 24 | } 25 | 26 | return nil; 27 | } 28 | 29 | return [self.setting getValue]; 30 | } 31 | 32 | - (void)setUIValues{ 33 | [super setUIValues]; 34 | 35 | [self setTitle]; 36 | 37 | if([self.setting valueForKey:InAppSettingsSpecifierInAppURL] || 38 | [self.setting valueForKey:InAppSettingsSpecifierInAppTwitter]){ 39 | [self setDisclosure:YES]; 40 | self.canSelectCell = YES; 41 | } 42 | 43 | [self setDetail:[self getValueTitle]]; 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /InAppSettings/InAppSettingsPSToggleSwitchSpecifierCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // PSToggleSwitchSpecifier.h 3 | // InAppSettingsTestApp 4 | // 5 | // Created by David Keegan on 11/21/09. 6 | // Copyright 2009 InScopeApps{+}. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "InAppSettingsTableCell.h" 11 | 12 | @interface InAppSettingsPSToggleSwitchSpecifierCell : InAppSettingsTableCell 13 | 14 | @property (nonatomic, strong) UISwitch *valueSwitch; 15 | 16 | - (BOOL)getBool; 17 | - (void)setBool:(BOOL)newValue; 18 | - (void)switchAction; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /InAppSettings/InAppSettingsPSToggleSwitchSpecifierCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // PSToggleSwitchSpecifier.m 3 | // InAppSettingsTestApp 4 | // 5 | // Created by David Keegan on 11/21/09. 6 | // Copyright 2009 InScopeApps{+}. All rights reserved. 7 | // 8 | 9 | #import "InAppSettingsPSToggleSwitchSpecifierCell.h" 10 | #import "InAppSettingsConstants.h" 11 | 12 | @implementation InAppSettingsPSToggleSwitchSpecifierCell 13 | 14 | // The value associated with the preference when the toggle switch 15 | // is in the ON position. The value type for this key can be any 16 | // scalar type, including Boolean, String, Number, Date, or Data. 17 | // If this key is not present, the default value type is a Boolean. 18 | 19 | - (BOOL)getBool{ 20 | id value = [self.setting getValue]; 21 | id trueValue = [self.setting valueForKey:@"TrueValue"]; 22 | id falseValue = [self.setting valueForKey:@"FalseValue"]; 23 | 24 | if([value isEqual:trueValue]){ 25 | return YES; 26 | } 27 | 28 | if([value isEqual:falseValue]){ 29 | return NO; 30 | } 31 | 32 | //if there is no true or false values the value has to be a bool 33 | return [value boolValue]; 34 | } 35 | 36 | - (void)setBool:(BOOL)newValue{ 37 | id value = [NSNumber numberWithBool:newValue]; 38 | if(newValue){ 39 | id trueValue = [self.setting valueForKey:@"TrueValue"]; 40 | if(trueValue){ 41 | value = trueValue; 42 | } 43 | } 44 | else{ 45 | id falseValue = [self.setting valueForKey:@"FalseValue"]; 46 | if(falseValue){ 47 | value = falseValue; 48 | } 49 | } 50 | [self.setting setValue:value]; 51 | } 52 | 53 | - (void)switchAction{ 54 | [self setBool:[self.valueSwitch isOn]]; 55 | } 56 | 57 | - (void)setUIValues{ 58 | [super setUIValues]; 59 | 60 | [self setTitle]; 61 | self.valueSwitch.on = [self getBool]; 62 | } 63 | 64 | - (void)layoutSubviews{ 65 | [super layoutSubviews]; 66 | 67 | CGRect valueSwitchFrame = self.valueSwitch.frame; 68 | valueSwitchFrame.origin.y = CGRectGetMidY(self.contentView.bounds)-CGRectGetMidY(self.valueSwitch.bounds); 69 | valueSwitchFrame.origin.x = CGRectGetWidth(self.contentView.bounds)-CGRectGetWidth(valueSwitchFrame)-InAppSettingsCellPadding; 70 | self.valueSwitch.frame = CGRectIntegral(valueSwitchFrame); 71 | } 72 | 73 | - (void)setupCell{ 74 | [super setupCell]; 75 | 76 | //create the switch 77 | self.valueSwitch = [[UISwitch alloc] initWithFrame:CGRectZero]; 78 | [self.valueSwitch addTarget:self action:@selector(switchAction) forControlEvents:UIControlEventValueChanged]; 79 | [self.contentView addSubview:self.valueSwitch]; 80 | } 81 | 82 | @end 83 | -------------------------------------------------------------------------------- /InAppSettings/InAppSettingsReader.h: -------------------------------------------------------------------------------- 1 | // 2 | // InAppSettingsReader.h 3 | // InAppSettingsTestApp 4 | // 5 | // Created by David Keegan on 1/19/10. 6 | // Copyright 2010 InScopeApps{+}. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface InAppSettingsReaderRegisterDefaults : NSObject 12 | 13 | @property (nonatomic, strong) NSMutableArray *files; 14 | @property (nonatomic, strong) NSMutableDictionary *values; 15 | 16 | @end 17 | 18 | @interface InAppSettingsReader : NSObject 19 | 20 | @property (nonatomic, copy) NSString *file; 21 | @property (nonatomic, strong) NSMutableArray *headersAndFooters, *settings; 22 | 23 | - (id)initWithFile:(NSString *)inputFile; 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /InAppSettings/InAppSettingsReader.m: -------------------------------------------------------------------------------- 1 | // 2 | // InAppSettingsReader.m 3 | // InAppSettingsTestApp 4 | // 5 | // Created by David Keegan on 1/19/10. 6 | // Copyright 2010 InScopeApps{+}. All rights reserved. 7 | // 8 | 9 | #import "InAppSettingsReader.h" 10 | #import "InAppSettingsSpecifier.h" 11 | #import "InAppSettingsConstants.h" 12 | 13 | @implementation InAppSettingsReaderRegisterDefaults 14 | 15 | - (void)loadFile:(NSString *)file{ 16 | //if the file is not in the files list we havn't read it yet 17 | NSInteger fileIndex = [self.files indexOfObject:file]; 18 | if(fileIndex == NSNotFound){ 19 | [self.files addObject:file]; 20 | 21 | //load plist 22 | NSDictionary *settingsDictionary = [[NSDictionary alloc] initWithContentsOfFile:InAppSettingsFullPlistPath(file)]; 23 | NSArray *preferenceSpecifiers = [settingsDictionary objectForKey:InAppSettingsPreferenceSpecifiers]; 24 | NSString *stringsTable = [settingsDictionary objectForKey:InAppSettingsStringsTable]; 25 | [preferenceSpecifiers enumerateObjectsUsingBlock:^(NSDictionary *setting, NSUInteger idx, BOOL *stop) { 26 | InAppSettingsSpecifier *settingsSpecifier = [[InAppSettingsSpecifier alloc] initWithDictionary:setting andStringsTable:stringsTable]; 27 | if([settingsSpecifier isValid]){ 28 | if([settingsSpecifier isType:InAppSettingsPSChildPaneSpecifier]){ 29 | [self loadFile:[settingsSpecifier valueForKey:InAppSettingsSpecifierFile]]; 30 | }else if([settingsSpecifier hasKey]){ 31 | if([settingsSpecifier valueForKey:InAppSettingsSpecifierDefaultValue]){ 32 | [self.values setObject:[settingsSpecifier valueForKey:InAppSettingsSpecifierDefaultValue] forKey:[settingsSpecifier getKey]]; 33 | } 34 | } 35 | } 36 | }]; 37 | } 38 | } 39 | 40 | - (id)init{ 41 | if((self = [super init])){ 42 | self.files = [[NSMutableArray alloc] init]; 43 | self.values = [[NSMutableDictionary alloc] init]; 44 | [self loadFile:InAppSettingsRootFile]; 45 | [[NSUserDefaults standardUserDefaults] registerDefaults:self.values]; 46 | } 47 | return self; 48 | } 49 | 50 | 51 | 52 | @end 53 | 54 | @implementation InAppSettingsReader 55 | 56 | - (id)initWithFile:(NSString *)inputFile{ 57 | if((self = [super init])){ 58 | self.file = inputFile; 59 | 60 | //load plist 61 | NSDictionary *settingsDictionary = [[NSDictionary alloc] initWithContentsOfFile:InAppSettingsFullPlistPath(self.file)]; 62 | NSArray *preferenceSpecifiers = [settingsDictionary objectForKey:InAppSettingsPreferenceSpecifiers]; 63 | NSString *stringsTable = [settingsDictionary objectForKey:InAppSettingsStringsTable]; 64 | 65 | //initialize the arrays 66 | self.headersAndFooters = [[NSMutableArray alloc] init]; 67 | self.settings = [[NSMutableArray alloc] init]; 68 | 69 | //load the data 70 | [preferenceSpecifiers enumerateObjectsUsingBlock:^(NSDictionary *setting, NSUInteger idx, BOOL *stop) { 71 | InAppSettingsSpecifier *settingsSpecifier = [[InAppSettingsSpecifier alloc] initWithDictionary:setting andStringsTable:stringsTable]; 72 | if([settingsSpecifier isValid]){ 73 | if([settingsSpecifier isType:InAppSettingsPSGroupSpecifier]){ 74 | [self.headersAndFooters addObject:@[[settingsSpecifier localizedTitle], [settingsSpecifier localizedFooterText]]]; 75 | [self.settings addObject:[NSMutableArray array]]; 76 | }else{ 77 | //if there are no settings make an initial container 78 | if([self.settings count] < 1){ 79 | [self.headersAndFooters addObject:@[@"", @""]]; 80 | [self.settings addObject:[NSMutableArray array]]; 81 | } 82 | [[self.settings lastObject] addObject:settingsSpecifier]; 83 | } 84 | } 85 | }]; 86 | } 87 | return self; 88 | } 89 | 90 | 91 | @end 92 | -------------------------------------------------------------------------------- /InAppSettings/InAppSettingsSpecifier.h: -------------------------------------------------------------------------------- 1 | // 2 | // InAppSetting.h 3 | // InAppSettingsTestApp 4 | // 5 | // Created by David Keegan on 11/21/09. 6 | // Copyright 2009 InScopeApps{+}. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface InAppSettingsSpecifier : NSObject 12 | 13 | @property (nonatomic, strong) NSDictionary *settingDictionary; 14 | @property (nonatomic, strong) NSString *stringsTable; 15 | 16 | - (NSString *)getKey; 17 | - (NSString *)getType; 18 | - (BOOL)isType:(NSString *)type; 19 | - (id)getValue; 20 | - (void)setValue:(id)newValue; 21 | - (id)valueForKey:(NSString *)key; 22 | - (NSString *)localizedTitle; 23 | - (NSString *)localizedFooterText; 24 | - (NSString *)cellName; 25 | 26 | - (BOOL)hasTitle; 27 | - (BOOL)hasKey; 28 | - (BOOL)hasDefaultValue; 29 | - (BOOL)isValid; 30 | 31 | - (id)initWithDictionary:(NSDictionary *)dictionary andStringsTable:(NSString *)table; 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /InAppSettings/InAppSettingsSpecifier.m: -------------------------------------------------------------------------------- 1 | // 2 | // InAppSetting.m 3 | // InAppSettingsTestApp 4 | // 5 | // Created by David Keegan on 11/21/09. 6 | // Copyright 2009 InScopeApps{+}. All rights reserved. 7 | // 8 | 9 | #import "InAppSettings.h" 10 | #import "InAppSettingsSpecifier.h" 11 | #import "InAppSettingsConstants.h" 12 | 13 | @implementation InAppSettingsSpecifier 14 | 15 | - (NSString *)getKey{ 16 | return [self valueForKey:InAppSettingsSpecifierKey]; 17 | } 18 | 19 | - (NSString *)getType{ 20 | return [self valueForKey:InAppSettingsSpecifierType]; 21 | } 22 | 23 | - (BOOL)isType:(NSString *)type{ 24 | return [[self getType] isEqualToString:type]; 25 | } 26 | 27 | - (id)valueForKey:(NSString *)key{ 28 | return [self.settingDictionary objectForKey:key]; 29 | } 30 | 31 | - (NSString *)localizedTitle{ 32 | NSString *title = [self valueForKey:InAppSettingsSpecifierTitle]; 33 | if([self valueForKey:InAppSettingsSpecifierInAppTitle]){ 34 | title = [self valueForKey:InAppSettingsSpecifierInAppTitle]; 35 | } 36 | return InAppSettingsLocalize(title, self.stringsTable); 37 | } 38 | 39 | - (NSString *)localizedFooterText{ 40 | NSString *footerText = [self valueForKey:InAppSettingsSpecifierFooterText]; 41 | return InAppSettingsLocalize(footerText, self.stringsTable); 42 | } 43 | 44 | - (NSString *)cellName{ 45 | return [NSString stringWithFormat:@"%@%@Cell", InAppSettingsProjectName, [self getType]]; 46 | } 47 | 48 | - (id)getValue{ 49 | id value = nil; 50 | if([self getKey]){ 51 | value = [[NSUserDefaults standardUserDefaults] valueForKey:[self getKey]]; 52 | } 53 | if(value == nil){ 54 | value = [self valueForKey:InAppSettingsSpecifierDefaultValue]; 55 | } 56 | return value; 57 | } 58 | 59 | - (void)setValue:(id)newValue{ 60 | NSString *key = [self getKey]; 61 | [[NSUserDefaults standardUserDefaults] setObject:newValue forKey:key]; 62 | NSNotification *notification = [NSNotification notificationWithName:InAppSettingsValueChangeNotification object:key]; 63 | [[NSNotificationCenter defaultCenter] postNotification:notification]; 64 | } 65 | 66 | #pragma mark validation 67 | 68 | - (BOOL)hasTitle{ 69 | return ([self valueForKey:InAppSettingsSpecifierTitle]) ? YES:NO; 70 | } 71 | 72 | - (BOOL)hasKey{ 73 | NSString *key = [self getKey]; 74 | return (key && (![key isEqualToString:@""])); 75 | } 76 | 77 | - (BOOL)hasDefaultValue{ 78 | return ([self valueForKey:InAppSettingsSpecifierDefaultValue]) ? YES:NO; 79 | } 80 | 81 | - (BOOL)isTwitterOrURL{ 82 | return ([self valueForKey:InAppSettingsSpecifierInAppTwitter] || [self valueForKey:InAppSettingsSpecifierInAppURL]) ? YES:NO; 83 | } 84 | 85 | - (BOOL)isValid{ 86 | if(![self getType]){ 87 | return NO; 88 | } 89 | 90 | if([self isType:InAppSettingsPSGroupSpecifier]){ 91 | return YES; 92 | } 93 | 94 | if([self isType:InAppSettingsPSMultiValueSpecifier]){ 95 | if(![self hasKey]){ 96 | return NO; 97 | } 98 | 99 | if(![self hasDefaultValue]){ 100 | return NO; 101 | } 102 | 103 | //check the localized and un-locatlized values 104 | //Xcode 5: Conflict between length for NSString and NSLayoutConstraint, casting to NSString 105 | if(![self hasTitle] || [(NSString*)[self valueForKey:InAppSettingsSpecifierTitle] length] == 0){ 106 | return NO; 107 | } 108 | 109 | NSArray *titles = [self valueForKey:InAppSettingsSpecifierTitles]; 110 | if((!titles) || ([titles count] == 0)){ 111 | return NO; 112 | } 113 | 114 | NSArray *values = [self valueForKey:InAppSettingsSpecifierValues]; 115 | if((!values) || ([values count] == 0)){ 116 | return NO; 117 | } 118 | 119 | if([titles count] != [values count]){ 120 | return NO; 121 | } 122 | 123 | return YES; 124 | } 125 | 126 | if([self isType:InAppSettingsPSSliderSpecifier]){ 127 | if(![self hasKey]){ 128 | return NO; 129 | } 130 | 131 | if(![self hasDefaultValue]){ 132 | return NO; 133 | } 134 | 135 | //The settings app allows min>max 136 | if(![self valueForKey:InAppSettingsSpecifierMinimumValue]){ 137 | return NO; 138 | } 139 | 140 | if(![self valueForKey:InAppSettingsSpecifierMaximumValue]){ 141 | return NO; 142 | } 143 | 144 | return YES; 145 | } 146 | 147 | if([self isType:InAppSettingsPSToggleSwitchSpecifier]){ 148 | if(![self hasKey]){ 149 | return NO; 150 | } 151 | 152 | if(![self hasDefaultValue]){ 153 | return NO; 154 | } 155 | 156 | if(![self hasTitle]){ 157 | return NO; 158 | } 159 | 160 | return YES; 161 | } 162 | 163 | if([self isType:InAppSettingsPSTitleValueSpecifier]){ 164 | if(![self isTwitterOrURL]){ 165 | if(![self hasKey]){ 166 | return NO; 167 | } 168 | 169 | if(![self hasDefaultValue]){ 170 | return NO; 171 | } 172 | } 173 | 174 | return YES; 175 | } 176 | 177 | if([self isType:InAppSettingsPSTextFieldSpecifier]){ 178 | if(![self hasKey]){ 179 | return NO; 180 | } 181 | 182 | if(![self hasTitle]){ 183 | return NO; 184 | } 185 | 186 | return YES; 187 | } 188 | 189 | if([self isType:InAppSettingsPSChildPaneSpecifier]){ 190 | if(![self hasTitle]){ 191 | return NO; 192 | } 193 | 194 | if(![self valueForKey:InAppSettingsSpecifierFile]){ 195 | return NO; 196 | } 197 | 198 | return YES; 199 | } 200 | 201 | return NO; 202 | } 203 | 204 | #pragma mark init/dealloc 205 | 206 | - (id)init{ 207 | return [self initWithDictionary:nil andStringsTable:nil]; 208 | } 209 | 210 | - (id)initWithDictionary:(NSDictionary *)dictionary andStringsTable:(NSString *)table{ 211 | self = [super init]; 212 | if (self != nil){ 213 | if(dictionary){ 214 | self.stringsTable = table; 215 | self.settingDictionary = dictionary; 216 | } 217 | } 218 | return self; 219 | } 220 | 221 | 222 | @end 223 | -------------------------------------------------------------------------------- /InAppSettings/InAppSettingsTableCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // InAppSettingsTableCell.h 3 | // InAppSettingsTestApp 4 | // 5 | // Created by David Keegan on 11/21/09. 6 | // Copyright 2009 InScopeApps{+}. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "InAppSettingsSpecifier.h" 11 | 12 | @interface InAppSettingsTableCell : UITableViewCell 13 | 14 | @property (nonatomic, strong) InAppSettingsSpecifier *setting; 15 | @property (nonatomic, strong) UILabel *titleLabel, *valueLabel; 16 | @property (nonatomic, weak) UIControl *valueInput; 17 | @property (nonatomic) BOOL canSelectCell; 18 | 19 | - (void)setTitle; 20 | - (void)setDetail; 21 | - (void)setDetail:(NSString *)detail; 22 | - (void)setDisclosure:(BOOL)disclosure; 23 | 24 | - (void)setValueDelegate:(id)delegate; 25 | 26 | - (void)setupCell; 27 | - (void)setUIValues; 28 | - (id)initWithReuseIdentifier:(NSString *)reuseIdentifier; 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /InAppSettings/InAppSettingsTableCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // InAppSettingsTableCell.m 3 | // InAppSettingsTestApp 4 | // 5 | // Created by David Keegan on 11/21/09. 6 | // Copyright 2009 InScopeApps{+}. All rights reserved. 7 | // 8 | 9 | #import "InAppSettingsTableCell.h" 10 | #import "InAppSettingsConstants.h" 11 | 12 | @implementation InAppSettingsTableCell 13 | 14 | @synthesize setting; 15 | @synthesize titleLabel, valueLabel; 16 | @synthesize valueInput; 17 | @synthesize canSelectCell; 18 | 19 | #pragma mark Cell lables 20 | 21 | - (void)setTitle{ 22 | self.titleLabel.text = [self.setting localizedTitle]; 23 | } 24 | 25 | - (void)setDetail{ 26 | [self setDetail:[self.setting getValue]]; 27 | } 28 | 29 | - (void)setDetail:(NSString *)detail{ 30 | //the detail is not localized 31 | self.valueLabel.text = detail; 32 | } 33 | 34 | - (void)setDisclosure:(BOOL)disclosure{ 35 | if(disclosure){ 36 | self.accessoryType = UITableViewCellAccessoryDisclosureIndicator; 37 | } 38 | else{ 39 | self.accessoryType = UITableViewCellAccessoryNone; 40 | } 41 | } 42 | 43 | - (void)setCanSelectCell:(BOOL)value{ 44 | if(value){ 45 | self.selectionStyle = UITableViewCellSelectionStyleBlue; 46 | }else{ 47 | self.selectionStyle = UITableViewCellSelectionStyleNone; 48 | } 49 | canSelectCell = value; 50 | } 51 | 52 | - (void)layoutSubviews{ 53 | [super layoutSubviews]; 54 | 55 | // self.contentView.backgroundColor = [UIColor blueColor]; 56 | 57 | // title view 58 | //iOS7: Updating sizeWithFont (depreciated) to sizeWithAttributes 59 | #if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 60 | CGSize titleSize = [self.titleLabel.text sizeWithAttributes: 61 | @{NSFontAttributeName:[UIFont systemFontOfSize:InAppSettingsFontSize]}]; 62 | #else 63 | CGSize titleSize = [self.titleLabel.text sizeWithFont:self.titleLabel.font]; 64 | #endif 65 | 66 | CGFloat maxTitleWidth = InAppSettingsCellTitleMaxWidth; 67 | if([self.setting isType:InAppSettingsPSToggleSwitchSpecifier]){ 68 | maxTitleWidth = InAppSettingsCellTitleMaxWidth-(InAppSettingsCellToggleSwitchWidth+InAppSettingsCellPadding); 69 | } 70 | if(titleSize.width > maxTitleWidth){ 71 | titleSize.width = maxTitleWidth; 72 | } 73 | 74 | CGRect titleFrame = self.titleLabel.frame; 75 | titleFrame.size = titleSize; 76 | titleFrame.origin.x = InAppSettingsCellPadding; 77 | titleFrame.origin.y = (CGFloat)round(CGRectGetMidY(self.contentView.bounds)-(titleSize.height*0.5f)); 78 | self.titleLabel.frame = titleFrame; 79 | 80 | // detail view 81 | CGRect valueFrame = self.valueLabel.frame; 82 | //iOS7: Updating sizeWithFont (depreciated) to sizeWithAttributes 83 | #if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 84 | CGSize valueSize = [self.valueLabel.text sizeWithAttributes: 85 | @{NSFontAttributeName:[UIFont systemFontOfSize:InAppSettingsFontSize]}]; 86 | #else 87 | CGSize valueSize = [self.valueLabel.text sizeWithFont:self.valueLabel.font]; 88 | #endif 89 | 90 | CGFloat titleRightSide = CGRectGetWidth(self.titleLabel.bounds)+InAppSettingsTablePadding; 91 | CGFloat valueMaxWidth = CGRectGetWidth(self.contentView.bounds)-(titleRightSide+InAppSettingsTablePadding+InAppSettingsCellPadding*3); 92 | if(valueSize.width > valueMaxWidth){ 93 | valueSize.width = valueMaxWidth; 94 | } 95 | 96 | if(!InAppSettingsUseNewMultiValueLocation && [self.setting isType:InAppSettingsPSMultiValueSpecifier] && [[self.setting localizedTitle] length] == 0){ 97 | valueFrame.origin.x = InAppSettingsCellPadding; 98 | }else{ 99 | valueFrame.origin.x = CGRectGetWidth(self.contentView.bounds)-valueSize.width-InAppSettingsCellPadding; 100 | if(titleRightSide >= valueFrame.origin.x){ 101 | valueFrame.origin.x = titleRightSide; 102 | } 103 | } 104 | valueFrame.origin.y = (CGFloat)round(CGRectGetMidY(self.contentView.bounds)-(valueSize.height*0.5f)); 105 | valueFrame.size.width = CGRectGetWidth(self.contentView.bounds)-valueFrame.origin.x-InAppSettingsCellPadding; 106 | 107 | //if the width is less then 0 just hide the label 108 | if(valueFrame.size.width <= 0){ 109 | self.valueLabel.hidden = YES; 110 | }else{ 111 | self.valueLabel.hidden = NO; 112 | } 113 | valueFrame.size.height = valueSize.height; 114 | self.valueLabel.frame = valueFrame; 115 | } 116 | 117 | #pragma mark - 118 | 119 | - (id)initWithReuseIdentifier:(NSString *)reuseIdentifier{ 120 | //the docs say UITableViewCellStyleValue1 is used for settings, 121 | //but it doesn't look 100% the same so we will just draw our own UILabels 122 | self = [super initWithStyle:UITableViewCellStyleDefault reuseIdentifier:reuseIdentifier]; 123 | if(self != nil){ 124 | self.canSelectCell = NO; 125 | } 126 | 127 | return self; 128 | } 129 | 130 | #pragma mark implement in cell 131 | 132 | - (void)setUIValues{ 133 | //implement this per cell type 134 | } 135 | 136 | - (void)setValueDelegate:(id)delegate{ 137 | //implement in cell 138 | } 139 | 140 | - (void)setupCell{ 141 | //setup title label 142 | self.titleLabel = [[UILabel alloc] initWithFrame:CGRectZero]; 143 | if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7) { 144 | self.titleLabel.font = InAppSettingsNormalFont; //changed from Bold to Normal for iOS7 145 | } else { 146 | self.titleLabel.font = InAppSettingsBoldFont; 147 | } 148 | self.titleLabel.highlightedTextColor = [UIColor whiteColor]; 149 | self.titleLabel.backgroundColor = [UIColor clearColor]; 150 | // self.titleLabel.backgroundColor = [UIColor greenColor]; 151 | [self.contentView addSubview:self.titleLabel]; 152 | 153 | //setup value label 154 | self.valueLabel = [[UILabel alloc] initWithFrame:CGRectZero]; 155 | self.valueLabel.font = InAppSettingsNormalFont; 156 | self.valueLabel.textColor = InAppSettingsBlue; 157 | self.valueLabel.highlightedTextColor = [UIColor whiteColor]; 158 | self.valueLabel.backgroundColor = [UIColor clearColor]; 159 | // self.valueLabel.backgroundColor = [UIColor redColor]; 160 | self.valueLabel.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin; 161 | [self.contentView addSubview:self.valueLabel]; 162 | } 163 | 164 | @end 165 | -------------------------------------------------------------------------------- /InAppSettingsTestApp/Classes/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // InAppSettingsTestAppAppDelegate.h 3 | // InAppSettingsTestApp 4 | // 5 | // Created by David Keegan on 11/24/09. 6 | // Copyright InScopeApps{+} 2009. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : NSObject 12 | 13 | @property (nonatomic, strong) IBOutlet UIWindow *window; 14 | @property (nonatomic, strong) IBOutlet UITabBarController *tabBarController; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /InAppSettingsTestApp/Classes/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // InAppSettingsTestAppAppDelegate.m 3 | // InAppSettingsTestApp 4 | // 5 | // Created by David Keegan on 11/24/09. 6 | // Copyright InScopeApps{+} 2009. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | #import "InAppSettings.h" 11 | 12 | @implementation AppDelegate 13 | 14 | + (void)initialize{ 15 | if([self class] == [AppDelegate class]){ 16 | [InAppSettings registerDefaults]; 17 | } 18 | } 19 | 20 | - (void)applicationDidFinishLaunching:(UIApplication *)application{ 21 | [self.window addSubview:self.tabBarController.view]; 22 | } 23 | 24 | 25 | @end 26 | 27 | -------------------------------------------------------------------------------- /InAppSettingsTestApp/Classes/RootViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // RootViewController.h 3 | // InAppSettingsTestApp 4 | // 5 | // Created by David Keegan on 11/21/09. 6 | // Copyright InScopeApps{+} 2009. All rights reserved. 7 | // 8 | 9 | @interface RootViewController : UIViewController 10 | 11 | @property (nonatomic, strong) IBOutlet UILabel *userSettingsLabel1; 12 | @property (nonatomic, strong) IBOutlet UILabel *userSettingsLabel2; 13 | @property (nonatomic, strong) IBOutlet UILabel *userSettingsLabel3; 14 | @property (nonatomic, strong) IBOutlet UILabel *userSettingsLabel4; 15 | 16 | - (IBAction)showSettings; 17 | - (IBAction)presentSettings; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /InAppSettingsTestApp/Classes/RootViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // RootViewController.m 3 | // InAppSettingsTestApp 4 | // 5 | // Created by David Keegan on 11/21/09. 6 | // Copyright InScopeApps{+} 2009. All rights reserved. 7 | // 8 | 9 | #import "RootViewController.h" 10 | #import "InAppSettings.h" 11 | 12 | @implementation RootViewController 13 | 14 | //this method is called by InAppSettingsNotification when a user default is changed by InAppSettings 15 | - (void)InAppSettingsNotificationHandler:(NSNotification*)notification{ 16 | //the object of an InAppSettingsNotification is the user defaults key 17 | NSString *userDefaultsKey = [notification object]; 18 | id userDefaultObject = [[NSUserDefaults standardUserDefaults] objectForKey:userDefaultsKey]; 19 | 20 | NSLog(@"%@=%@", userDefaultsKey, userDefaultObject); 21 | 22 | if([userDefaultsKey isEqualToString:@"textEntry_NumbersAndPunctuation"]){ 23 | self.userSettingsLabel1.text = [NSString stringWithFormat:@"%@", userDefaultObject]; 24 | }else if([userDefaultsKey isEqualToString:@"textEntry_URL"]){ 25 | self.userSettingsLabel2.text = [NSString stringWithFormat:@"%@", userDefaultObject]; 26 | }else if([userDefaultsKey isEqualToString:@"toogle_string"]){ 27 | self.userSettingsLabel3.text = [NSString stringWithFormat:@"%@", userDefaultObject]; 28 | }else if([userDefaultsKey isEqualToString:@"slider_key"]){ 29 | self.userSettingsLabel4.text = [NSString stringWithFormat:@"%@", userDefaultObject]; 30 | } 31 | } 32 | 33 | - (void)awakeFromNib{ 34 | self.userSettingsLabel1.text = [NSString stringWithFormat:@"%@", [[NSUserDefaults standardUserDefaults] objectForKey:@"textEntry_NumbersAndPunctuation"]]; 35 | self.userSettingsLabel2.text = [NSString stringWithFormat:@"%@", [[NSUserDefaults standardUserDefaults] objectForKey:@"textEntry_URL"]]; 36 | self.userSettingsLabel3.text = [NSString stringWithFormat:@"%@", [[NSUserDefaults standardUserDefaults] objectForKey:@"toogle_string"]]; 37 | self.userSettingsLabel4.text = [NSString stringWithFormat:@"%@", [[NSUserDefaults standardUserDefaults] objectForKey:@"slider_key"]]; 38 | 39 | //setup InAppSettings notifications of then user defaults change 40 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(InAppSettingsNotificationHandler:) name:InAppSettingsValueChangeNotification object:nil]; 41 | } 42 | 43 | //push InAppSettings onto the navigation stack 44 | - (IBAction)showSettings{ 45 | InAppSettingsViewController *settings = [[InAppSettingsViewController alloc] init]; 46 | [self.navigationController pushViewController:settings animated:YES]; 47 | } 48 | 49 | //present InAppSettings as a modal view 50 | - (IBAction)presentSettings{ 51 | InAppSettingsModalViewController *settings = [[InAppSettingsModalViewController alloc] init]; 52 | [self presentViewController:settings animated:YES completion:nil]; 53 | } 54 | 55 | - (void)dealloc{ 56 | [[NSNotificationCenter defaultCenter] removeObserver:self]; 57 | } 58 | 59 | @end 60 | 61 | -------------------------------------------------------------------------------- /InAppSettingsTestApp/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kgn/InAppSettings/a7a9885df12d9ab575d9d093a640ca6d34b06f26/InAppSettingsTestApp/Default-568h@2x.png -------------------------------------------------------------------------------- /InAppSettingsTestApp/InAppSettings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kgn/InAppSettings/a7a9885df12d9ab575d9d093a640ca6d34b06f26/InAppSettingsTestApp/InAppSettings.png -------------------------------------------------------------------------------- /InAppSettingsTestApp/InAppSettings@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kgn/InAppSettings/a7a9885df12d9ab575d9d093a640ca6d34b06f26/InAppSettingsTestApp/InAppSettings@2x.png -------------------------------------------------------------------------------- /InAppSettingsTestApp/InAppSettingsTestApp-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIconFile 12 | 13 | CFBundleIdentifier 14 | com.yourcompany.${PRODUCT_NAME:rfc1034identifier} 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | ${PRODUCT_NAME} 19 | CFBundlePackageType 20 | APPL 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | NSMainNibFile 28 | MainWindow 29 | UISupportedInterfaceOrientations 30 | 31 | UIInterfaceOrientationPortrait 32 | UIInterfaceOrientationLandscapeLeft 33 | UIInterfaceOrientationLandscapeRight 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /InAppSettingsTestApp/InAppSettingsTestApp.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1D3623260D0F684500981E51 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* AppDelegate.m */; }; 11 | 1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; }; 12 | 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; 13 | 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; 14 | 2892E4100DC94CBA00A64D0F /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2892E40F0DC94CBA00A64D0F /* CoreGraphics.framework */; }; 15 | 28AD73600D9D9599002E5188 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28AD735F0D9D9599002E5188 /* MainWindow.xib */; }; 16 | 28C286E10D94DF7D0034E888 /* RootViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 28C286E00D94DF7D0034E888 /* RootViewController.m */; }; 17 | 730365A3126BBB4A00EFC68D /* Settings.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 730365A2126BBB4A00EFC68D /* Settings.bundle */; }; 18 | 831CD1891854122F006FA03B /* InAppSettings.m in Sources */ = {isa = PBXBuildFile; fileRef = 831CD1731854122F006FA03B /* InAppSettings.m */; }; 19 | 831CD18A1854122F006FA03B /* InAppSettingsPSChildPaneSpecifierCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 831CD1761854122F006FA03B /* InAppSettingsPSChildPaneSpecifierCell.m */; }; 20 | 831CD18B1854122F006FA03B /* InAppSettingsPSMultiValueSpecifierCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 831CD1781854122F006FA03B /* InAppSettingsPSMultiValueSpecifierCell.m */; }; 21 | 831CD18C1854122F006FA03B /* InAppSettingsPSMultiValueSpecifierTable.m in Sources */ = {isa = PBXBuildFile; fileRef = 831CD17A1854122F006FA03B /* InAppSettingsPSMultiValueSpecifierTable.m */; }; 22 | 831CD18D1854122F006FA03B /* InAppSettingsPSSliderSpecifierCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 831CD17C1854122F006FA03B /* InAppSettingsPSSliderSpecifierCell.m */; }; 23 | 831CD18E1854122F006FA03B /* InAppSettingsPSTextFieldSpecifierCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 831CD17E1854122F006FA03B /* InAppSettingsPSTextFieldSpecifierCell.m */; }; 24 | 831CD18F1854122F006FA03B /* InAppSettingsPSTitleValueSpecifierCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 831CD1801854122F006FA03B /* InAppSettingsPSTitleValueSpecifierCell.m */; }; 25 | 831CD1901854122F006FA03B /* InAppSettingsPSToggleSwitchSpecifierCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 831CD1821854122F006FA03B /* InAppSettingsPSToggleSwitchSpecifierCell.m */; }; 26 | 831CD1911854122F006FA03B /* InAppSettingsReader.m in Sources */ = {isa = PBXBuildFile; fileRef = 831CD1841854122F006FA03B /* InAppSettingsReader.m */; }; 27 | 831CD1921854122F006FA03B /* InAppSettingsSpecifier.m in Sources */ = {isa = PBXBuildFile; fileRef = 831CD1861854122F006FA03B /* InAppSettingsSpecifier.m */; }; 28 | 831CD1931854122F006FA03B /* InAppSettingsTableCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 831CD1881854122F006FA03B /* InAppSettingsTableCell.m */; }; 29 | 831CD19618541241006FA03B /* InAppSettings.png in Resources */ = {isa = PBXBuildFile; fileRef = 831CD19418541241006FA03B /* InAppSettings.png */; }; 30 | 831CD19718541241006FA03B /* InAppSettings@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 831CD19518541241006FA03B /* InAppSettings@2x.png */; }; 31 | 837D55CF16613E44003C7FBD /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 837D55CE16613E44003C7FBD /* Default-568h@2x.png */; }; 32 | /* End PBXBuildFile section */ 33 | 34 | /* Begin PBXFileReference section */ 35 | 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 36 | 1D3623240D0F684500981E51 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 37 | 1D3623250D0F684500981E51 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 38 | 1D6058910D05DD3D006BFB54 /* InAppSettingsTestApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = InAppSettingsTestApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; 39 | 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 40 | 2892E40F0DC94CBA00A64D0F /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 41 | 28A0AAE50D9B0CCF005BE974 /* InAppSettingsTestApp_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InAppSettingsTestApp_Prefix.pch; sourceTree = ""; }; 42 | 28AD735F0D9D9599002E5188 /* MainWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MainWindow.xib; sourceTree = ""; }; 43 | 28C286DF0D94DF7D0034E888 /* RootViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RootViewController.h; sourceTree = ""; }; 44 | 28C286E00D94DF7D0034E888 /* RootViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RootViewController.m; sourceTree = ""; }; 45 | 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 46 | 730365A2126BBB4A00EFC68D /* Settings.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = Settings.bundle; path = pretty_settings/Settings.bundle; sourceTree = ""; }; 47 | 831CD1721854122F006FA03B /* InAppSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InAppSettings.h; sourceTree = ""; }; 48 | 831CD1731854122F006FA03B /* InAppSettings.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InAppSettings.m; sourceTree = ""; }; 49 | 831CD1741854122F006FA03B /* InAppSettingsConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InAppSettingsConstants.h; sourceTree = ""; }; 50 | 831CD1751854122F006FA03B /* InAppSettingsPSChildPaneSpecifierCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InAppSettingsPSChildPaneSpecifierCell.h; sourceTree = ""; }; 51 | 831CD1761854122F006FA03B /* InAppSettingsPSChildPaneSpecifierCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InAppSettingsPSChildPaneSpecifierCell.m; sourceTree = ""; }; 52 | 831CD1771854122F006FA03B /* InAppSettingsPSMultiValueSpecifierCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InAppSettingsPSMultiValueSpecifierCell.h; sourceTree = ""; }; 53 | 831CD1781854122F006FA03B /* InAppSettingsPSMultiValueSpecifierCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InAppSettingsPSMultiValueSpecifierCell.m; sourceTree = ""; }; 54 | 831CD1791854122F006FA03B /* InAppSettingsPSMultiValueSpecifierTable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InAppSettingsPSMultiValueSpecifierTable.h; sourceTree = ""; }; 55 | 831CD17A1854122F006FA03B /* InAppSettingsPSMultiValueSpecifierTable.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InAppSettingsPSMultiValueSpecifierTable.m; sourceTree = ""; }; 56 | 831CD17B1854122F006FA03B /* InAppSettingsPSSliderSpecifierCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InAppSettingsPSSliderSpecifierCell.h; sourceTree = ""; }; 57 | 831CD17C1854122F006FA03B /* InAppSettingsPSSliderSpecifierCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InAppSettingsPSSliderSpecifierCell.m; sourceTree = ""; }; 58 | 831CD17D1854122F006FA03B /* InAppSettingsPSTextFieldSpecifierCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InAppSettingsPSTextFieldSpecifierCell.h; sourceTree = ""; }; 59 | 831CD17E1854122F006FA03B /* InAppSettingsPSTextFieldSpecifierCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InAppSettingsPSTextFieldSpecifierCell.m; sourceTree = ""; }; 60 | 831CD17F1854122F006FA03B /* InAppSettingsPSTitleValueSpecifierCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InAppSettingsPSTitleValueSpecifierCell.h; sourceTree = ""; }; 61 | 831CD1801854122F006FA03B /* InAppSettingsPSTitleValueSpecifierCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InAppSettingsPSTitleValueSpecifierCell.m; sourceTree = ""; }; 62 | 831CD1811854122F006FA03B /* InAppSettingsPSToggleSwitchSpecifierCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InAppSettingsPSToggleSwitchSpecifierCell.h; sourceTree = ""; }; 63 | 831CD1821854122F006FA03B /* InAppSettingsPSToggleSwitchSpecifierCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InAppSettingsPSToggleSwitchSpecifierCell.m; sourceTree = ""; }; 64 | 831CD1831854122F006FA03B /* InAppSettingsReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InAppSettingsReader.h; sourceTree = ""; }; 65 | 831CD1841854122F006FA03B /* InAppSettingsReader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InAppSettingsReader.m; sourceTree = ""; }; 66 | 831CD1851854122F006FA03B /* InAppSettingsSpecifier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InAppSettingsSpecifier.h; sourceTree = ""; }; 67 | 831CD1861854122F006FA03B /* InAppSettingsSpecifier.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InAppSettingsSpecifier.m; sourceTree = ""; }; 68 | 831CD1871854122F006FA03B /* InAppSettingsTableCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InAppSettingsTableCell.h; sourceTree = ""; }; 69 | 831CD1881854122F006FA03B /* InAppSettingsTableCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InAppSettingsTableCell.m; sourceTree = ""; }; 70 | 831CD19418541241006FA03B /* InAppSettings.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = InAppSettings.png; sourceTree = ""; }; 71 | 831CD19518541241006FA03B /* InAppSettings@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "InAppSettings@2x.png"; sourceTree = ""; }; 72 | 837D55CE16613E44003C7FBD /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; 73 | 8D1107310486CEB800E47090 /* InAppSettingsTestApp-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "InAppSettingsTestApp-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = ""; }; 74 | /* End PBXFileReference section */ 75 | 76 | /* Begin PBXFrameworksBuildPhase section */ 77 | 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { 78 | isa = PBXFrameworksBuildPhase; 79 | buildActionMask = 2147483647; 80 | files = ( 81 | 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, 82 | 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, 83 | 2892E4100DC94CBA00A64D0F /* CoreGraphics.framework in Frameworks */, 84 | ); 85 | runOnlyForDeploymentPostprocessing = 0; 86 | }; 87 | /* End PBXFrameworksBuildPhase section */ 88 | 89 | /* Begin PBXGroup section */ 90 | 080E96DDFE201D6D7F000001 /* Classes */ = { 91 | isa = PBXGroup; 92 | children = ( 93 | 28C286DF0D94DF7D0034E888 /* RootViewController.h */, 94 | 28C286E00D94DF7D0034E888 /* RootViewController.m */, 95 | 1D3623240D0F684500981E51 /* AppDelegate.h */, 96 | 1D3623250D0F684500981E51 /* AppDelegate.m */, 97 | ); 98 | path = Classes; 99 | sourceTree = ""; 100 | }; 101 | 19C28FACFE9D520D11CA2CBB /* Products */ = { 102 | isa = PBXGroup; 103 | children = ( 104 | 1D6058910D05DD3D006BFB54 /* InAppSettingsTestApp.app */, 105 | ); 106 | name = Products; 107 | sourceTree = ""; 108 | }; 109 | 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { 110 | isa = PBXGroup; 111 | children = ( 112 | 831CD19418541241006FA03B /* InAppSettings.png */, 113 | 831CD19518541241006FA03B /* InAppSettings@2x.png */, 114 | 831CD1711854122F006FA03B /* InAppSettings */, 115 | 080E96DDFE201D6D7F000001 /* Classes */, 116 | 29B97315FDCFA39411CA2CEA /* Other Sources */, 117 | 29B97317FDCFA39411CA2CEA /* Resources */, 118 | 29B97323FDCFA39411CA2CEA /* Frameworks */, 119 | 19C28FACFE9D520D11CA2CBB /* Products */, 120 | ); 121 | name = CustomTemplate; 122 | sourceTree = ""; 123 | }; 124 | 29B97315FDCFA39411CA2CEA /* Other Sources */ = { 125 | isa = PBXGroup; 126 | children = ( 127 | 28A0AAE50D9B0CCF005BE974 /* InAppSettingsTestApp_Prefix.pch */, 128 | 29B97316FDCFA39411CA2CEA /* main.m */, 129 | ); 130 | name = "Other Sources"; 131 | sourceTree = ""; 132 | }; 133 | 29B97317FDCFA39411CA2CEA /* Resources */ = { 134 | isa = PBXGroup; 135 | children = ( 136 | 837D55CE16613E44003C7FBD /* Default-568h@2x.png */, 137 | 730365A2126BBB4A00EFC68D /* Settings.bundle */, 138 | 28AD735F0D9D9599002E5188 /* MainWindow.xib */, 139 | 8D1107310486CEB800E47090 /* InAppSettingsTestApp-Info.plist */, 140 | ); 141 | name = Resources; 142 | sourceTree = ""; 143 | }; 144 | 29B97323FDCFA39411CA2CEA /* Frameworks */ = { 145 | isa = PBXGroup; 146 | children = ( 147 | 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, 148 | 1D30AB110D05D00D00671497 /* Foundation.framework */, 149 | 2892E40F0DC94CBA00A64D0F /* CoreGraphics.framework */, 150 | ); 151 | name = Frameworks; 152 | sourceTree = ""; 153 | }; 154 | 831CD1711854122F006FA03B /* InAppSettings */ = { 155 | isa = PBXGroup; 156 | children = ( 157 | 831CD1721854122F006FA03B /* InAppSettings.h */, 158 | 831CD1731854122F006FA03B /* InAppSettings.m */, 159 | 831CD1741854122F006FA03B /* InAppSettingsConstants.h */, 160 | 831CD1751854122F006FA03B /* InAppSettingsPSChildPaneSpecifierCell.h */, 161 | 831CD1761854122F006FA03B /* InAppSettingsPSChildPaneSpecifierCell.m */, 162 | 831CD1771854122F006FA03B /* InAppSettingsPSMultiValueSpecifierCell.h */, 163 | 831CD1781854122F006FA03B /* InAppSettingsPSMultiValueSpecifierCell.m */, 164 | 831CD1791854122F006FA03B /* InAppSettingsPSMultiValueSpecifierTable.h */, 165 | 831CD17A1854122F006FA03B /* InAppSettingsPSMultiValueSpecifierTable.m */, 166 | 831CD17B1854122F006FA03B /* InAppSettingsPSSliderSpecifierCell.h */, 167 | 831CD17C1854122F006FA03B /* InAppSettingsPSSliderSpecifierCell.m */, 168 | 831CD17D1854122F006FA03B /* InAppSettingsPSTextFieldSpecifierCell.h */, 169 | 831CD17E1854122F006FA03B /* InAppSettingsPSTextFieldSpecifierCell.m */, 170 | 831CD17F1854122F006FA03B /* InAppSettingsPSTitleValueSpecifierCell.h */, 171 | 831CD1801854122F006FA03B /* InAppSettingsPSTitleValueSpecifierCell.m */, 172 | 831CD1811854122F006FA03B /* InAppSettingsPSToggleSwitchSpecifierCell.h */, 173 | 831CD1821854122F006FA03B /* InAppSettingsPSToggleSwitchSpecifierCell.m */, 174 | 831CD1831854122F006FA03B /* InAppSettingsReader.h */, 175 | 831CD1841854122F006FA03B /* InAppSettingsReader.m */, 176 | 831CD1851854122F006FA03B /* InAppSettingsSpecifier.h */, 177 | 831CD1861854122F006FA03B /* InAppSettingsSpecifier.m */, 178 | 831CD1871854122F006FA03B /* InAppSettingsTableCell.h */, 179 | 831CD1881854122F006FA03B /* InAppSettingsTableCell.m */, 180 | ); 181 | name = InAppSettings; 182 | path = ../InAppSettings; 183 | sourceTree = ""; 184 | }; 185 | /* End PBXGroup section */ 186 | 187 | /* Begin PBXNativeTarget section */ 188 | 1D6058900D05DD3D006BFB54 /* InAppSettingsTestApp */ = { 189 | isa = PBXNativeTarget; 190 | buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "InAppSettingsTestApp" */; 191 | buildPhases = ( 192 | 1D60588D0D05DD3D006BFB54 /* Resources */, 193 | 1D60588E0D05DD3D006BFB54 /* Sources */, 194 | 1D60588F0D05DD3D006BFB54 /* Frameworks */, 195 | ); 196 | buildRules = ( 197 | ); 198 | dependencies = ( 199 | ); 200 | name = InAppSettingsTestApp; 201 | productName = InAppSettingsTestApp; 202 | productReference = 1D6058910D05DD3D006BFB54 /* InAppSettingsTestApp.app */; 203 | productType = "com.apple.product-type.application"; 204 | }; 205 | /* End PBXNativeTarget section */ 206 | 207 | /* Begin PBXProject section */ 208 | 29B97313FDCFA39411CA2CEA /* Project object */ = { 209 | isa = PBXProject; 210 | attributes = { 211 | LastUpgradeCheck = 0450; 212 | }; 213 | buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "InAppSettingsTestApp" */; 214 | compatibilityVersion = "Xcode 3.2"; 215 | developmentRegion = English; 216 | hasScannedForEncodings = 1; 217 | knownRegions = ( 218 | English, 219 | Japanese, 220 | French, 221 | German, 222 | en, 223 | ); 224 | mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; 225 | projectDirPath = ""; 226 | projectRoot = ""; 227 | targets = ( 228 | 1D6058900D05DD3D006BFB54 /* InAppSettingsTestApp */, 229 | ); 230 | }; 231 | /* End PBXProject section */ 232 | 233 | /* Begin PBXResourcesBuildPhase section */ 234 | 1D60588D0D05DD3D006BFB54 /* Resources */ = { 235 | isa = PBXResourcesBuildPhase; 236 | buildActionMask = 2147483647; 237 | files = ( 238 | 28AD73600D9D9599002E5188 /* MainWindow.xib in Resources */, 239 | 831CD19618541241006FA03B /* InAppSettings.png in Resources */, 240 | 831CD19718541241006FA03B /* InAppSettings@2x.png in Resources */, 241 | 730365A3126BBB4A00EFC68D /* Settings.bundle in Resources */, 242 | 837D55CF16613E44003C7FBD /* Default-568h@2x.png in Resources */, 243 | ); 244 | runOnlyForDeploymentPostprocessing = 0; 245 | }; 246 | /* End PBXResourcesBuildPhase section */ 247 | 248 | /* Begin PBXSourcesBuildPhase section */ 249 | 1D60588E0D05DD3D006BFB54 /* Sources */ = { 250 | isa = PBXSourcesBuildPhase; 251 | buildActionMask = 2147483647; 252 | files = ( 253 | 831CD1901854122F006FA03B /* InAppSettingsPSToggleSwitchSpecifierCell.m in Sources */, 254 | 831CD1921854122F006FA03B /* InAppSettingsSpecifier.m in Sources */, 255 | 831CD1931854122F006FA03B /* InAppSettingsTableCell.m in Sources */, 256 | 831CD18F1854122F006FA03B /* InAppSettingsPSTitleValueSpecifierCell.m in Sources */, 257 | 831CD18D1854122F006FA03B /* InAppSettingsPSSliderSpecifierCell.m in Sources */, 258 | 1D60589B0D05DD56006BFB54 /* main.m in Sources */, 259 | 1D3623260D0F684500981E51 /* AppDelegate.m in Sources */, 260 | 831CD18E1854122F006FA03B /* InAppSettingsPSTextFieldSpecifierCell.m in Sources */, 261 | 831CD18C1854122F006FA03B /* InAppSettingsPSMultiValueSpecifierTable.m in Sources */, 262 | 28C286E10D94DF7D0034E888 /* RootViewController.m in Sources */, 263 | 831CD1911854122F006FA03B /* InAppSettingsReader.m in Sources */, 264 | 831CD18A1854122F006FA03B /* InAppSettingsPSChildPaneSpecifierCell.m in Sources */, 265 | 831CD1891854122F006FA03B /* InAppSettings.m in Sources */, 266 | 831CD18B1854122F006FA03B /* InAppSettingsPSMultiValueSpecifierCell.m in Sources */, 267 | ); 268 | runOnlyForDeploymentPostprocessing = 0; 269 | }; 270 | /* End PBXSourcesBuildPhase section */ 271 | 272 | /* Begin XCBuildConfiguration section */ 273 | 1D6058940D05DD3E006BFB54 /* Debug */ = { 274 | isa = XCBuildConfiguration; 275 | buildSettings = { 276 | ALWAYS_SEARCH_USER_PATHS = NO; 277 | CLANG_ENABLE_OBJC_ARC = YES; 278 | COPY_PHASE_STRIP = NO; 279 | GCC_DYNAMIC_NO_PIC = NO; 280 | GCC_OPTIMIZATION_LEVEL = 0; 281 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 282 | GCC_PREFIX_HEADER = InAppSettingsTestApp_Prefix.pch; 283 | INFOPLIST_FILE = "InAppSettingsTestApp-Info.plist"; 284 | IPHONEOS_DEPLOYMENT_TARGET = 5.0; 285 | PRODUCT_NAME = InAppSettingsTestApp; 286 | }; 287 | name = Debug; 288 | }; 289 | 1D6058950D05DD3E006BFB54 /* Release */ = { 290 | isa = XCBuildConfiguration; 291 | buildSettings = { 292 | ALWAYS_SEARCH_USER_PATHS = NO; 293 | CLANG_ENABLE_OBJC_ARC = YES; 294 | COPY_PHASE_STRIP = YES; 295 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 296 | GCC_PREFIX_HEADER = InAppSettingsTestApp_Prefix.pch; 297 | INFOPLIST_FILE = "InAppSettingsTestApp-Info.plist"; 298 | IPHONEOS_DEPLOYMENT_TARGET = 5.0; 299 | PRODUCT_NAME = InAppSettingsTestApp; 300 | }; 301 | name = Release; 302 | }; 303 | C01FCF4F08A954540054247B /* Debug */ = { 304 | isa = XCBuildConfiguration; 305 | buildSettings = { 306 | ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 307 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 308 | GCC_C_LANGUAGE_STANDARD = c99; 309 | GCC_PREPROCESSOR_DEFINITIONS = DEBUG; 310 | GCC_TREAT_WARNINGS_AS_ERRORS = YES; 311 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 312 | GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES; 313 | GCC_WARN_ABOUT_MISSING_NEWLINE = YES; 314 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 315 | GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; 316 | GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES; 317 | GCC_WARN_MISSING_PARENTHESES = YES; 318 | GCC_WARN_SHADOW = YES; 319 | GCC_WARN_SIGN_COMPARE = YES; 320 | GCC_WARN_STRICT_SELECTOR_MATCH = YES; 321 | GCC_WARN_UNDECLARED_SELECTOR = YES; 322 | GCC_WARN_UNUSED_FUNCTION = YES; 323 | GCC_WARN_UNUSED_LABEL = YES; 324 | GCC_WARN_UNUSED_VALUE = YES; 325 | GCC_WARN_UNUSED_VARIABLE = YES; 326 | RUN_CLANG_STATIC_ANALYZER = YES; 327 | SDKROOT = iphoneos; 328 | }; 329 | name = Debug; 330 | }; 331 | C01FCF5008A954540054247B /* Release */ = { 332 | isa = XCBuildConfiguration; 333 | buildSettings = { 334 | ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 335 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 336 | GCC_C_LANGUAGE_STANDARD = c99; 337 | GCC_TREAT_WARNINGS_AS_ERRORS = YES; 338 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 339 | GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES; 340 | GCC_WARN_ABOUT_MISSING_NEWLINE = YES; 341 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 342 | GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; 343 | GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES; 344 | GCC_WARN_MISSING_PARENTHESES = YES; 345 | GCC_WARN_SHADOW = YES; 346 | GCC_WARN_SIGN_COMPARE = YES; 347 | GCC_WARN_STRICT_SELECTOR_MATCH = YES; 348 | GCC_WARN_UNDECLARED_SELECTOR = YES; 349 | GCC_WARN_UNUSED_FUNCTION = YES; 350 | GCC_WARN_UNUSED_LABEL = YES; 351 | GCC_WARN_UNUSED_VALUE = YES; 352 | GCC_WARN_UNUSED_VARIABLE = YES; 353 | RUN_CLANG_STATIC_ANALYZER = YES; 354 | SDKROOT = iphoneos; 355 | }; 356 | name = Release; 357 | }; 358 | /* End XCBuildConfiguration section */ 359 | 360 | /* Begin XCConfigurationList section */ 361 | 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "InAppSettingsTestApp" */ = { 362 | isa = XCConfigurationList; 363 | buildConfigurations = ( 364 | 1D6058940D05DD3E006BFB54 /* Debug */, 365 | 1D6058950D05DD3E006BFB54 /* Release */, 366 | ); 367 | defaultConfigurationIsVisible = 0; 368 | defaultConfigurationName = Release; 369 | }; 370 | C01FCF4E08A954540054247B /* Build configuration list for PBXProject "InAppSettingsTestApp" */ = { 371 | isa = XCConfigurationList; 372 | buildConfigurations = ( 373 | C01FCF4F08A954540054247B /* Debug */, 374 | C01FCF5008A954540054247B /* Release */, 375 | ); 376 | defaultConfigurationIsVisible = 0; 377 | defaultConfigurationName = Release; 378 | }; 379 | /* End XCConfigurationList section */ 380 | }; 381 | rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; 382 | } 383 | -------------------------------------------------------------------------------- /InAppSettingsTestApp/InAppSettingsTestApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /InAppSettingsTestApp/InAppSettingsTestApp.xcodeproj/project.xcworkspace/xcshareddata/InAppSettingsTestApp.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | 900A50FA-12FB-432F-B29D-3DC4E77CB594 9 | IDESourceControlProjectName 10 | InAppSettingsTestApp 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | FDF0D77A-BD47-4D67-B0B1-3B659787681D 14 | https://github.com/kgn/InAppSettings.git 15 | 16 | IDESourceControlProjectPath 17 | InAppSettingsTestApp/InAppSettingsTestApp.xcodeproj/project.xcworkspace 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | FDF0D77A-BD47-4D67-B0B1-3B659787681D 21 | ../../.. 22 | 23 | IDESourceControlProjectURL 24 | https://github.com/kgn/InAppSettings.git 25 | IDESourceControlProjectVersion 26 | 110 27 | IDESourceControlProjectWCCIdentifier 28 | FDF0D77A-BD47-4D67-B0B1-3B659787681D 29 | IDESourceControlProjectWCConfigurations 30 | 31 | 32 | IDESourceControlRepositoryExtensionIdentifierKey 33 | public.vcs.git 34 | IDESourceControlWCCIdentifierKey 35 | FDF0D77A-BD47-4D67-B0B1-3B659787681D 36 | IDESourceControlWCCName 37 | InAppSettings 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /InAppSettingsTestApp/InAppSettingsTestApp.xcodeproj/xcuserdata/keegan.xcuserdatad/xcschemes/InAppSettingsTestApp.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 51 | 52 | 58 | 59 | 60 | 61 | 62 | 63 | 69 | 70 | 76 | 77 | 78 | 79 | 81 | 82 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /InAppSettingsTestApp/InAppSettingsTestApp.xcodeproj/xcuserdata/keegan.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | InAppSettingsTestApp.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 1D6058900D05DD3D006BFB54 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /InAppSettingsTestApp/InAppSettingsTestApp_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'InAppSettingsTestApp' target in the 'InAppSettingsTestApp' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #import 8 | #endif 9 | -------------------------------------------------------------------------------- /InAppSettingsTestApp/MainWindow.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1552 5 | 12C3006 6 | 3084 7 | 1187.34 8 | 625.00 9 | 10 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 11 | 2083 12 | 13 | 14 | YES 15 | IBProxyObject 16 | IBUIBarButtonItem 17 | IBUIButton 18 | IBUICustomObject 19 | IBUILabel 20 | IBUINavigationBar 21 | IBUINavigationController 22 | IBUINavigationItem 23 | IBUITabBar 24 | IBUITabBarController 25 | IBUITabBarItem 26 | IBUIView 27 | IBUIViewController 28 | IBUIWindow 29 | 30 | 31 | YES 32 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 33 | 34 | 35 | PluginDependencyRecalculationVersion 36 | 37 | 38 | 39 | YES 40 | 41 | IBFilesOwner 42 | IBCocoaTouchFramework 43 | 44 | 45 | IBFirstResponder 46 | IBCocoaTouchFramework 47 | 48 | 49 | IBCocoaTouchFramework 50 | 51 | 52 | 53 | 1316 54 | 55 | {320, 480} 56 | 57 | 58 | 59 | 1 60 | MSAxIDEAA 61 | 62 | NO 63 | NO 64 | 65 | IBCocoaTouchFramework 66 | YES 67 | 68 | 69 | 70 | 71 | 72 | 1 73 | 1 74 | 75 | IBCocoaTouchFramework 76 | NO 77 | 78 | 79 | IBCocoaTouchFramework 80 | 81 | 6 82 | 83 | 84 | 85 | 86 | 1 87 | 1 88 | 89 | IBCocoaTouchFramework 90 | NO 91 | 92 | 93 | 256 94 | {0, 0} 95 | NO 96 | YES 97 | YES 98 | IBCocoaTouchFramework 99 | 100 | 101 | YES 102 | 103 | 104 | 105 | 274 106 | 107 | YES 108 | 109 | 110 | 292 111 | {{282, 328}, {18, 19}} 112 | 113 | 114 | NO 115 | NO 116 | IBCocoaTouchFramework 117 | 0 118 | 0 119 | 3 120 | YES 121 | 122 | 3 123 | MQA 124 | 125 | 126 | 1 127 | MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA 128 | 129 | 130 | 3 131 | MC41AA 132 | 133 | 134 | Helvetica-Bold 135 | Helvetica 136 | 2 137 | 15 138 | 139 | 140 | Helvetica-Bold 141 | 15 142 | 16 143 | 144 | 145 | 146 | 147 | 292 148 | {{20, 20}, {280, 21}} 149 | 150 | 151 | NO 152 | YES 153 | NO 154 | IBCocoaTouchFramework 155 | Label 156 | 157 | 158 | 159 | 3 160 | MAA 161 | 162 | 2 163 | 164 | 165 | {0, 1} 166 | 1 167 | 10 168 | 169 | 1 170 | 17 171 | 172 | 173 | Helvetica 174 | 17 175 | 16 176 | 177 | 178 | 179 | 180 | 292 181 | {{20, 49}, {280, 21}} 182 | 183 | 184 | NO 185 | YES 186 | NO 187 | IBCocoaTouchFramework 188 | Label 189 | 190 | 191 | 192 | 3 193 | MAA 194 | 195 | 196 | {0, 1} 197 | 1 198 | 10 199 | 200 | 201 | 202 | 203 | 204 | 292 205 | {{20, 78}, {280, 21}} 206 | 207 | 208 | NO 209 | YES 210 | NO 211 | IBCocoaTouchFramework 212 | Label 213 | 214 | 215 | 216 | 3 217 | MAA 218 | 219 | 220 | {0, 1} 221 | 1 222 | 10 223 | 224 | 225 | 226 | 227 | 228 | 292 229 | {{20, 107}, {280, 21}} 230 | 231 | 232 | NO 233 | YES 234 | NO 235 | IBCocoaTouchFramework 236 | Label 237 | 238 | 239 | 240 | 3 241 | MAA 242 | 243 | 244 | {0, 1} 245 | 1 246 | 10 247 | 248 | 249 | 250 | 251 | {{0, 20}, {320, 367}} 252 | 253 | 254 | 255 | 3 256 | MC4yNQA 257 | 258 | 259 | NO 260 | IBCocoaTouchFramework 261 | 262 | 263 | Root 264 | 265 | Settings 266 | IBCocoaTouchFramework 267 | 1 268 | 269 | 270 | IBCocoaTouchFramework 271 | 272 | 273 | 274 | 1 275 | 1 276 | 277 | IBCocoaTouchFramework 278 | NO 279 | 280 | 281 | 282 | 283 | YES 284 | 285 | 286 | 287 | Settings 288 | 289 | NSImage 290 | InAppSettings.png 291 | 292 | IBCocoaTouchFramework 293 | 294 | 295 | 296 | 297 | 298 | 1 299 | 1 300 | 301 | IBCocoaTouchFramework 302 | NO 303 | 304 | 305 | 256 306 | {0, 0} 307 | NO 308 | YES 309 | YES 310 | IBCocoaTouchFramework 311 | 312 | 313 | YES 314 | 315 | 316 | 317 | IBCocoaTouchFramework 318 | 319 | 320 | 321 | 1 322 | 1 323 | 324 | IBCocoaTouchFramework 325 | NO 326 | 327 | 328 | 329 | 330 | 331 | 332 | 266 333 | {{0, 387}, {320, 49}} 334 | 335 | 336 | 337 | 3 338 | MCAwAA 339 | 340 | NO 341 | IBCocoaTouchFramework 342 | 343 | YES 344 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 352 | 353 | YES 354 | 355 | 356 | delegate 357 | 358 | 359 | 360 | 99 361 | 362 | 363 | 364 | window 365 | 366 | 367 | 368 | 9 369 | 370 | 371 | 372 | tabBarController 373 | 374 | 375 | 376 | 113 377 | 378 | 379 | 380 | userSettingsLabel1 381 | 382 | 383 | 384 | 157 385 | 386 | 387 | 388 | userSettingsLabel2 389 | 390 | 391 | 392 | 158 393 | 394 | 395 | 396 | userSettingsLabel3 397 | 398 | 399 | 400 | 159 401 | 402 | 403 | 404 | userSettingsLabel4 405 | 406 | 407 | 408 | 160 409 | 410 | 411 | 412 | showSettings 413 | 414 | 415 | 416 | 132 417 | 418 | 419 | 420 | presentSettings 421 | 422 | 423 | 7 424 | 425 | 151 426 | 427 | 428 | 429 | 430 | YES 431 | 432 | 0 433 | 434 | YES 435 | 436 | 437 | 438 | 439 | 440 | -1 441 | 442 | 443 | File's Owner 444 | 445 | 446 | 106 447 | 448 | 449 | YES 450 | 451 | 452 | 453 | 454 | 455 | 456 | 457 | 107 458 | 459 | 460 | 461 | 462 | -2 463 | 464 | 465 | 466 | 467 | 124 468 | 469 | 470 | YES 471 | 472 | 473 | 474 | 475 | 476 | 477 | 478 | 126 479 | 480 | 481 | 482 | 483 | 128 484 | 485 | 486 | 487 | 488 | 133 489 | 490 | 491 | YES 492 | 493 | 494 | 495 | 496 | 497 | 498 | 499 | 134 500 | 501 | 502 | YES 503 | 504 | 505 | 506 | 507 | 508 | 135 509 | 510 | 511 | 512 | 513 | 136 514 | 515 | 516 | 517 | 518 | 137 519 | 520 | 521 | 522 | 523 | 125 524 | 525 | 526 | YES 527 | 528 | 529 | 530 | 531 | 532 | 533 | 127 534 | 535 | 536 | YES 537 | 538 | 539 | 540 | 541 | 542 | 131 543 | 544 | 545 | 546 | 547 | 149 548 | 549 | 550 | YES 551 | 552 | 553 | 554 | 555 | 556 | 557 | 558 | 559 | 560 | 150 561 | 562 | 563 | 564 | 565 | 152 566 | 567 | 568 | 569 | 570 | 153 571 | 572 | 573 | 574 | 575 | 154 576 | 577 | 578 | 579 | 580 | 155 581 | 582 | 583 | 584 | 585 | 3 586 | 587 | 588 | 589 | 590 | 2 591 | 592 | 593 | 594 | 595 | 596 | 597 | YES 598 | 599 | YES 600 | -1.CustomClassName 601 | -1.IBPluginDependency 602 | -2.CustomClassName 603 | -2.IBPluginDependency 604 | 106.IBPluginDependency 605 | 107.IBPluginDependency 606 | 124.IBPluginDependency 607 | 125.CustomClassName 608 | 125.IBPluginDependency 609 | 126.IBPluginDependency 610 | 127.IBPluginDependency 611 | 128.IBPluginDependency 612 | 131.IBPluginDependency 613 | 133.IBPluginDependency 614 | 134.CustomClassName 615 | 134.IBPluginDependency 616 | 135.IBPluginDependency 617 | 136.IBPluginDependency 618 | 137.IBPluginDependency 619 | 149.IBPluginDependency 620 | 150.IBPluginDependency 621 | 152.IBPluginDependency 622 | 153.IBPluginDependency 623 | 154.IBPluginDependency 624 | 155.IBPluginDependency 625 | 2.IBAttributePlaceholdersKey 626 | 2.IBPluginDependency 627 | 3.CustomClassName 628 | 3.IBPluginDependency 629 | 630 | 631 | YES 632 | UIApplication 633 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 634 | UIResponder 635 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 636 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 637 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 638 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 639 | RootViewController 640 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 641 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 642 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 643 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 644 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 645 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 646 | InAppSettingsViewController 647 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 648 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 649 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 650 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 651 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 652 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 653 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 654 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 655 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 656 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 657 | 658 | YES 659 | 660 | 661 | 662 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 663 | AppDelegate 664 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 665 | 666 | 667 | 668 | YES 669 | 670 | 671 | 672 | 673 | 674 | YES 675 | 676 | 677 | 678 | 679 | 161 680 | 681 | 682 | 683 | YES 684 | 685 | AppDelegate 686 | NSObject 687 | 688 | YES 689 | 690 | YES 691 | tabBarController 692 | window 693 | 694 | 695 | YES 696 | UITabBarController 697 | UIWindow 698 | 699 | 700 | 701 | YES 702 | 703 | YES 704 | tabBarController 705 | window 706 | 707 | 708 | YES 709 | 710 | tabBarController 711 | UITabBarController 712 | 713 | 714 | window 715 | UIWindow 716 | 717 | 718 | 719 | 720 | IBProjectSource 721 | ./Classes/AppDelegate.h 722 | 723 | 724 | 725 | InAppSettingsViewController 726 | UIViewController 727 | 728 | dismissModalView: 729 | id 730 | 731 | 732 | dismissModalView: 733 | 734 | dismissModalView: 735 | id 736 | 737 | 738 | 739 | IBProjectSource 740 | ./Classes/InAppSettingsViewController.h 741 | 742 | 743 | 744 | RootViewController 745 | UIViewController 746 | 747 | YES 748 | 749 | YES 750 | presentSettings 751 | showSettings 752 | 753 | 754 | YES 755 | id 756 | id 757 | 758 | 759 | 760 | YES 761 | 762 | YES 763 | presentSettings 764 | showSettings 765 | 766 | 767 | YES 768 | 769 | presentSettings 770 | id 771 | 772 | 773 | showSettings 774 | id 775 | 776 | 777 | 778 | 779 | YES 780 | 781 | YES 782 | userSettingsLabel1 783 | userSettingsLabel2 784 | userSettingsLabel3 785 | userSettingsLabel4 786 | 787 | 788 | YES 789 | UILabel 790 | UILabel 791 | UILabel 792 | UILabel 793 | 794 | 795 | 796 | YES 797 | 798 | YES 799 | userSettingsLabel1 800 | userSettingsLabel2 801 | userSettingsLabel3 802 | userSettingsLabel4 803 | 804 | 805 | YES 806 | 807 | userSettingsLabel1 808 | UILabel 809 | 810 | 811 | userSettingsLabel2 812 | UILabel 813 | 814 | 815 | userSettingsLabel3 816 | UILabel 817 | 818 | 819 | userSettingsLabel4 820 | UILabel 821 | 822 | 823 | 824 | 825 | IBProjectSource 826 | ./Classes/RootViewController.h 827 | 828 | 829 | 830 | 831 | 0 832 | IBCocoaTouchFramework 833 | 834 | com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS 835 | 836 | 837 | 838 | com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 839 | 840 | 841 | YES 842 | 3 843 | 844 | InAppSettings.png 845 | {26, 26} 846 | 847 | 2083 848 | 849 | 850 | -------------------------------------------------------------------------------- /InAppSettingsTestApp/RootViewController.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1552 5 | 12C3006 6 | 3084 7 | 1187.34 8 | 625.00 9 | 10 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 11 | 2083 12 | 13 | 14 | YES 15 | IBProxyObject 16 | IBUIBarButtonItem 17 | IBUIButton 18 | IBUILabel 19 | IBUINavigationBar 20 | IBUINavigationController 21 | IBUINavigationItem 22 | IBUITabBar 23 | IBUITabBarController 24 | IBUITabBarItem 25 | IBUIView 26 | IBUIViewController 27 | 28 | 29 | YES 30 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 31 | 32 | 33 | PluginDependencyRecalculationVersion 34 | 35 | 36 | 37 | YES 38 | 39 | IBFilesOwner 40 | IBCocoaTouchFramework 41 | 42 | 43 | IBFirstResponder 44 | IBCocoaTouchFramework 45 | 46 | 47 | 48 | 49 | 50 | 1 51 | 1 52 | 53 | 54 | IBUIScreenMetrics 55 | 56 | YES 57 | 58 | YES 59 | 60 | 61 | 62 | 63 | YES 64 | {320, 480} 65 | {480, 320} 66 | 67 | 68 | IBCocoaTouchFramework 69 | Retina 3.5 Full Screen 70 | 0 71 | 72 | IBCocoaTouchFramework 73 | NO 74 | 75 | 76 | IBCocoaTouchFramework 77 | 2 78 | 79 | 80 | 81 | 82 | 1 83 | 1 84 | 85 | IBCocoaTouchFramework 86 | NO 87 | 88 | 89 | 256 90 | {0, 0} 91 | NO 92 | YES 93 | YES 94 | IBCocoaTouchFramework 95 | 96 | 97 | YES 98 | 99 | 100 | 101 | 274 102 | 103 | YES 104 | 105 | 106 | 265 107 | {{282, 372}, {18, 19}} 108 | 109 | 110 | NO 111 | NO 112 | IBCocoaTouchFramework 113 | 0 114 | 0 115 | 3 116 | YES 117 | 118 | 3 119 | MQA 120 | 121 | 122 | 1 123 | MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA 124 | 125 | 126 | 3 127 | MC41AA 128 | 129 | 130 | Helvetica-Bold 131 | Helvetica 132 | 2 133 | 15 134 | 135 | 136 | Helvetica-Bold 137 | 15 138 | 16 139 | 140 | 141 | 142 | 143 | 292 144 | {{20, 20}, {280, 21}} 145 | 146 | 147 | NO 148 | YES 149 | NO 150 | IBCocoaTouchFramework 151 | Label 152 | 153 | 154 | 155 | 3 156 | MAA 157 | 158 | 2 159 | 160 | 161 | {0, 1} 162 | 1 163 | 10 164 | 165 | 1 166 | 17 167 | 168 | 169 | Helvetica 170 | 17 171 | 16 172 | 173 | 174 | 175 | 176 | 292 177 | {{20, 49}, {280, 21}} 178 | 179 | 180 | NO 181 | YES 182 | NO 183 | IBCocoaTouchFramework 184 | Label 185 | 186 | 187 | 188 | 3 189 | MAA 190 | 191 | 192 | {0, 1} 193 | 1 194 | 10 195 | 196 | 197 | 198 | 199 | 200 | 292 201 | {{20, 78}, {280, 21}} 202 | 203 | 204 | NO 205 | YES 206 | NO 207 | IBCocoaTouchFramework 208 | Label 209 | 210 | 211 | 212 | 3 213 | MAA 214 | 215 | 216 | {0, 1} 217 | 1 218 | 10 219 | 220 | 221 | 222 | 223 | 224 | 292 225 | {{20, 107}, {280, 21}} 226 | 227 | 228 | NO 229 | YES 230 | NO 231 | IBCocoaTouchFramework 232 | Label 233 | 234 | 235 | 236 | 3 237 | MAA 238 | 239 | 240 | {0, 1} 241 | 1 242 | 10 243 | 244 | 245 | 246 | 247 | {{0, 20}, {320, 411}} 248 | 249 | 250 | 251 | 3 252 | MC4yNQA 253 | 254 | 255 | NO 256 | IBCocoaTouchFramework 257 | 258 | 259 | Root 260 | 261 | Settings 262 | IBCocoaTouchFramework 263 | 1 264 | 265 | 266 | IBCocoaTouchFramework 267 | 268 | 269 | 270 | 1 271 | 1 272 | 273 | IBCocoaTouchFramework 274 | NO 275 | 276 | 277 | 278 | 279 | YES 280 | 281 | 282 | 283 | Settings 284 | 285 | NSImage 286 | InAppSettings.png 287 | 288 | IBCocoaTouchFramework 289 | 290 | 291 | 292 | 293 | 1 294 | 1 295 | 296 | IBCocoaTouchFramework 297 | NO 298 | 299 | 300 | 256 301 | {0, 0} 302 | NO 303 | YES 304 | YES 305 | IBCocoaTouchFramework 306 | 307 | 308 | YES 309 | 310 | 311 | 312 | IBCocoaTouchFramework 313 | 314 | 315 | 316 | 1 317 | 1 318 | 319 | IBCocoaTouchFramework 320 | NO 321 | 322 | 323 | 324 | 325 | 326 | 327 | 266 328 | {{0, 431}, {320, 49}} 329 | 330 | 331 | 332 | 3 333 | MCAwAA 334 | 335 | NO 336 | IBCocoaTouchFramework 337 | 338 | 339 | 340 | 341 | 342 | YES 343 | 344 | 345 | userSettingsLabel1 346 | 347 | 348 | 349 | 162 350 | 351 | 352 | 353 | userSettingsLabel2 354 | 355 | 356 | 357 | 163 358 | 359 | 360 | 361 | userSettingsLabel3 362 | 363 | 364 | 365 | 164 366 | 367 | 368 | 369 | userSettingsLabel4 370 | 371 | 372 | 373 | 165 374 | 375 | 376 | 377 | presentSettings 378 | 379 | 380 | 7 381 | 382 | 166 383 | 384 | 385 | 386 | 387 | YES 388 | 389 | 0 390 | 391 | YES 392 | 393 | 394 | 395 | 396 | 397 | -1 398 | 399 | 400 | File's Owner 401 | 402 | 403 | 106 404 | 405 | 406 | YES 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 107 415 | 416 | 417 | 418 | 419 | -2 420 | 421 | 422 | 423 | 424 | 124 425 | 426 | 427 | YES 428 | 429 | 430 | 431 | 432 | 433 | 434 | 435 | 126 436 | 437 | 438 | 439 | 440 | 128 441 | 442 | 443 | 444 | 445 | 133 446 | 447 | 448 | YES 449 | 450 | 451 | 452 | 453 | 454 | 455 | 456 | 134 457 | 458 | 459 | YES 460 | 461 | 462 | 463 | 464 | 465 | 135 466 | 467 | 468 | 469 | 470 | 136 471 | 472 | 473 | 474 | 475 | 137 476 | 477 | 478 | 479 | 480 | 125 481 | 482 | 483 | YES 484 | 485 | 486 | 487 | 488 | 489 | 490 | 127 491 | 492 | 493 | YES 494 | 495 | 496 | 497 | 498 | 499 | 149 500 | 501 | 502 | YES 503 | 504 | 505 | 506 | 507 | 508 | 509 | 510 | 511 | 512 | 150 513 | 514 | 515 | 516 | 517 | 152 518 | 519 | 520 | 521 | 522 | 153 523 | 524 | 525 | 526 | 527 | 154 528 | 529 | 530 | 531 | 532 | 155 533 | 534 | 535 | 536 | 537 | 167 538 | 539 | 540 | 541 | 542 | 543 | 544 | YES 545 | 546 | YES 547 | -1.IBPluginDependency 548 | -2.CustomClassName 549 | -2.IBPluginDependency 550 | 106.CustomClassName 551 | 106.IBPluginDependency 552 | 107.IBPluginDependency 553 | 124.IBPluginDependency 554 | 125.CustomClassName 555 | 125.IBPluginDependency 556 | 126.IBPluginDependency 557 | 127.IBPluginDependency 558 | 128.IBPluginDependency 559 | 133.IBPluginDependency 560 | 134.CustomClassName 561 | 134.IBPluginDependency 562 | 135.IBPluginDependency 563 | 136.IBPluginDependency 564 | 137.IBPluginDependency 565 | 149.IBPluginDependency 566 | 150.IBPluginDependency 567 | 152.IBPluginDependency 568 | 153.IBPluginDependency 569 | 154.IBPluginDependency 570 | 155.IBPluginDependency 571 | 167.IBPluginDependency 572 | 573 | 574 | YES 575 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 576 | UIResponder 577 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 578 | RootViewController 579 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 580 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 581 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 582 | RootViewController 583 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 584 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 585 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 586 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 587 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 588 | InAppSettingsViewController 589 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 590 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 591 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 592 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 593 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 594 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 595 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 596 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 597 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 598 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 599 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 600 | 601 | 602 | 603 | YES 604 | 605 | 606 | 607 | 608 | 609 | YES 610 | 611 | 612 | 613 | 614 | 167 615 | 616 | 617 | 0 618 | IBCocoaTouchFramework 619 | 620 | com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS 621 | 622 | 623 | 624 | com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 625 | 626 | 627 | YES 628 | 3 629 | 630 | InAppSettings.png 631 | {26, 26} 632 | 633 | 2083 634 | 635 | 636 | -------------------------------------------------------------------------------- /InAppSettingsTestApp/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // InAppSettingsTestApp 4 | // 5 | // Created by David Keegan on 11/21/09. 6 | // Copyright InScopeApps{+} 2009. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | int main(int argc, char *argv[]){ 12 | @autoreleasepool{ 13 | int retVal = UIApplicationMain(argc, argv, nil, nil); 14 | return retVal; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /InAppSettingsTestApp/peter_settings/Settings.bundle/Root.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | StringsTable 6 | Root 7 | PreferenceSpecifiers 8 | 9 | 10 | Type 11 | PSGroupSpecifier 12 | Title 13 | Live Tracker Data 14 | 15 | 16 | Type 17 | PSMultiValueSpecifier 18 | Title 19 | Tracker 20 | Key 21 | tracker 22 | DefaultValue 23 | 0 24 | Values 25 | 26 | 0 27 | http://www.livetrack24.com/track.php? 28 | http://test.livetrack24.com/track.php? 29 | 30 | Titles 31 | 32 | None 33 | Leonardo Live 34 | Leonardo Test 35 | 36 | 37 | 38 | Type 39 | PSTextFieldSpecifier 40 | Title 41 | Username 42 | Key 43 | username 44 | DefaultValue 45 | 46 | IsSecure 47 | 48 | KeyboardType 49 | Alphabet 50 | AutocapitalizationType 51 | None 52 | AutocorrectionType 53 | No 54 | 55 | 56 | Type 57 | PSTextFieldSpecifier 58 | Title 59 | Password 60 | Key 61 | password 62 | IsSecure 63 | 64 | KeyboardType 65 | Alphabet 66 | AutocapitalizationType 67 | None 68 | AutocorrectionType 69 | No 70 | 71 | 72 | Type 73 | PSTextFieldSpecifier 74 | Title 75 | Glider Make 76 | DefaultValue 77 | 78 | Key 79 | glidermake 80 | IsSecure 81 | 82 | KeyboardType 83 | Alphabet 84 | AutocapitalizationType 85 | None 86 | AutocorrectionType 87 | No 88 | 89 | 90 | Type 91 | PSTextFieldSpecifier 92 | Title 93 | Model 94 | DefaultValue 95 | 96 | Key 97 | glidermodel 98 | IsSecure 99 | 100 | KeyboardType 101 | Alphabet 102 | AutocapitalizationType 103 | None 104 | AutocorrectionType 105 | No 106 | 107 | 108 | Type 109 | PSMultiValueSpecifier 110 | Title 111 | Traveling via... 112 | Key 113 | transport 114 | DefaultValue 115 | Paraglider 116 | Values 117 | 118 | 1 119 | 2 120 | 4 121 | 8 122 | 16 123 | 32 124 | 64 125 | 128 126 | 16385 127 | 16386 128 | 16388 129 | 130 | Titles 131 | 132 | Paraglider 133 | Flex wing FAI1 134 | Rigid wing FAI5 135 | Glider 136 | Paramotor 137 | Trike 138 | Powered Flight 139 | Hot Air Balloon 140 | Walk 141 | Run 142 | Bike 143 | 144 | 145 | 146 | Type 147 | PSMultiValueSpecifier 148 | Title 149 | Final Message 150 | Key 151 | message 152 | DefaultValue 153 | 0 154 | Values 155 | 156 | 0 157 | 1 158 | 2 159 | 3 160 | 4 161 | 162 | Titles 163 | 164 | Everything OK 165 | Need retrieve 166 | Need some help, nothing broken 167 | Need help, maybe something broken 168 | HELP! Serious injury 169 | 170 | 171 | 172 | Type 173 | PSTextFieldSpecifier 174 | Title 175 | Log interval (seconds) 176 | Key 177 | loginterval 178 | DefaultValue 179 | 60 180 | IsSecure 181 | 182 | KeyboardType 183 | NumbersAndPunctuation 184 | AutocapitalizationType 185 | None 186 | AutocorrectionType 187 | No 188 | 189 | 190 | Type 191 | PSTextFieldSpecifier 192 | Title 193 | Accuracy threshold (meters) 194 | DefaultValue 195 | 100 196 | Key 197 | threshold 198 | IsSecure 199 | 200 | KeyboardType 201 | NumbersAndPunctuation 202 | AutocapitalizationType 203 | None 204 | AutocorrectionType 205 | No 206 | 207 | 208 | Type 209 | PSGroupSpecifier 210 | Title 211 | IGC Export Info (Pilots only!) 212 | 213 | 214 | Type 215 | PSTextFieldSpecifier 216 | Title 217 | Pilot Name 218 | Key 219 | pilotname 220 | DefaultValue 221 | 222 | IsSecure 223 | 224 | KeyboardType 225 | Alphabet 226 | AutocapitalizationType 227 | None 228 | AutocorrectionType 229 | No 230 | 231 | 232 | Type 233 | PSTextFieldSpecifier 234 | Title 235 | Glider ID 236 | Key 237 | gliderid 238 | DefaultValue 239 | 240 | IsSecure 241 | 242 | KeyboardType 243 | Alphabet 244 | AutocapitalizationType 245 | None 246 | AutocorrectionType 247 | No 248 | 249 | 250 | Type 251 | PSTextFieldSpecifier 252 | Title 253 | UTC Offset (H:MM) 254 | Key 255 | utcoffset 256 | DefaultValue 257 | 0:00 258 | IsSecure 259 | 260 | KeyboardType 261 | NumberAndPunctuation 262 | AutocapitalizationType 263 | None 264 | AutocorrectionType 265 | No 266 | 267 | 268 | Type 269 | PSGroupSpecifier 270 | Title 271 | About 272 | 273 | 274 | Type 275 | PSTitleValueSpecifier 276 | Title 277 | Version 278 | Key 279 | version 280 | DefaultValue 281 | 1.2.0 282 | IsSecure 283 | 284 | 285 | 286 | Type 287 | PSTitleValueSpecifier 288 | Title 289 | Programming 290 | Key 291 | programming 292 | DefaultValue 293 | freethinker gmbh 294 | IsSecure 295 | 296 | 297 | 298 | 299 | 300 | -------------------------------------------------------------------------------- /InAppSettingsTestApp/peter_settings/Settings.bundle/en.lproj/Root.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kgn/InAppSettings/a7a9885df12d9ab575d9d093a640ca6d34b06f26/InAppSettingsTestApp/peter_settings/Settings.bundle/en.lproj/Root.strings -------------------------------------------------------------------------------- /InAppSettingsTestApp/peter_settings/Settings.bundle/vehicles.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Title 6 | Mode of Transportation 7 | PreferenceSpecifiers 8 | 9 | 10 | Type 11 | PSGroupSpecifier 12 | Title 13 | Glider / Vehicle 14 | 15 | 16 | Type 17 | PSMultiValueSpecifier 18 | Title 19 | How I am getting there 20 | Key 21 | transport 22 | DefaultValue 23 | Paraglider 24 | Values 25 | 26 | 1 27 | 2 28 | 4 29 | 8 30 | 16 31 | 32 32 | 64 33 | 128 34 | 16385 35 | 16386 36 | 16388 37 | 38 | Titles 39 | 40 | Paraglider 41 | Flex wing FAI1 42 | Rigid wing FAI5 43 | Glider 44 | Paramotor 45 | Trike 46 | Powered Flight 47 | Hot Air Balloon 48 | Walk 49 | Run 50 | Bike 51 | 52 | 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /InAppSettingsTestApp/pretty_settings/Settings.bundle/Root.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | StringsTable 6 | Root 7 | PreferenceSpecifiers 8 | 9 | 10 | Type 11 | PSGroupSpecifier 12 | Title 13 | TEXT_EDITING 14 | 15 | 16 | Type 17 | PSSliderSpecifier 18 | Key 19 | textSize 20 | DefaultValue 21 | 8 22 | MinimumValue 23 | 1 24 | MaximumValue 25 | 10 26 | MinimumValueImage 27 | smallfont.png 28 | MaximumValueImage 29 | largefont.png 30 | 31 | 32 | Type 33 | PSToggleSwitchSpecifier 34 | Title 35 | AUTOCORRECT 36 | Key 37 | autoCorrectText 38 | DefaultValue 39 | YES 40 | TrueValue 41 | YES 42 | FalseValue 43 | NO 44 | 45 | 46 | Type 47 | PSGroupSpecifier 48 | Title 49 | ACCOUNT 50 | 51 | 52 | Type 53 | PSTextFieldSpecifier 54 | Title 55 | USERNAME 56 | Key 57 | twitterUsername 58 | AutocorrectionType 59 | No 60 | 61 | 62 | Type 63 | PSTextFieldSpecifier 64 | Title 65 | PASSWORD 66 | Key 67 | twitterPassword 68 | AutocorrectionType 69 | No 70 | IsSecure 71 | 72 | 73 | 74 | Type 75 | PSGroupSpecifier 76 | Title 77 | 78 | 79 | 80 | Type 81 | PSTitleValueSpecifier 82 | Title 83 | VERSION 84 | Key 85 | appVersion 86 | DefaultValue 87 | 1.2.2 88 | 89 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /InAppSettingsTestApp/pretty_settings/Settings.bundle/en.lproj/Root.strings: -------------------------------------------------------------------------------- 1 | "TEXT_EDITING" = "Text Editing"; 2 | "AUTOCORRECT" = "Auto Correct"; 3 | "ACCOUNT" = "Account"; 4 | "USERNAME" = "Username"; 5 | "PASSWORD" = "Password"; 6 | "VERSION" = "Version"; 7 | -------------------------------------------------------------------------------- /InAppSettingsTestApp/pretty_settings/Settings.bundle/largefont.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kgn/InAppSettings/a7a9885df12d9ab575d9d093a640ca6d34b06f26/InAppSettingsTestApp/pretty_settings/Settings.bundle/largefont.png -------------------------------------------------------------------------------- /InAppSettingsTestApp/pretty_settings/Settings.bundle/largefont@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kgn/InAppSettings/a7a9885df12d9ab575d9d093a640ca6d34b06f26/InAppSettingsTestApp/pretty_settings/Settings.bundle/largefont@2x.png -------------------------------------------------------------------------------- /InAppSettingsTestApp/pretty_settings/Settings.bundle/smallfont.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kgn/InAppSettings/a7a9885df12d9ab575d9d093a640ca6d34b06f26/InAppSettingsTestApp/pretty_settings/Settings.bundle/smallfont.png -------------------------------------------------------------------------------- /InAppSettingsTestApp/pretty_settings/Settings.bundle/smallfont@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kgn/InAppSettings/a7a9885df12d9ab575d9d093a640ca6d34b06f26/InAppSettingsTestApp/pretty_settings/Settings.bundle/smallfont@2x.png -------------------------------------------------------------------------------- /InAppSettingsTestApp/test_settings/Settings.bundle/ChildPane.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | Title 9 | LONGSTRING 10 | Type 11 | PSGroupSpecifier 12 | 13 | 14 | AutocapitalizationType 15 | Sentences 16 | AutocorrectionType 17 | Yes 18 | DefaultValue 19 | Cap Sentences 20 | IsSecure 21 | 22 | Key 23 | textEntry_capsentanceC 24 | KeyboardType 25 | Alphabet 26 | Title 27 | TEXTENTRY 28 | Type 29 | PSTextFieldSpecifier 30 | 31 | 32 | DefaultValue 33 | Hello World 34 | Key 35 | readOnly2_keyC 36 | Title 37 | READONLY 38 | Type 39 | PSTitleValueSpecifier 40 | 41 | 42 | Title 43 | SPACE 44 | Type 45 | PSGroupSpecifier 46 | 47 | 48 | DefaultValue 49 | YES 50 | FalseValue 51 | NO 52 | Key 53 | toogle_stringC 54 | Title 55 | Toogle String 56 | TrueValue 57 | YES 58 | Type 59 | PSToggleSwitchSpecifier 60 | 61 | 62 | DefaultValue 63 | 50 64 | Key 65 | slider_keyC 66 | MaximumValue 67 | 100 68 | MinimumValue 69 | 1 70 | Type 71 | PSSliderSpecifier 72 | 73 | 74 | DefaultValue 75 | 1 76 | Key 77 | colors_keyC 78 | Title 79 | COLOR 80 | Titles 81 | 82 | Blue 83 | Red 84 | Green 85 | 86 | Type 87 | PSMultiValueSpecifier 88 | Values 89 | 90 | 1 91 | 2 92 | 3 93 | 94 | 95 | 96 | Title 97 | Circular Reference! 98 | Type 99 | PSGroupSpecifier 100 | 101 | 102 | File 103 | Root 104 | Title 105 | Root Settings 106 | Type 107 | PSChildPaneSpecifier 108 | 109 | 110 | Title 111 | 112 | Type 113 | PSGroupSpecifier 114 | 115 | 116 | Title 117 | 118 | Type 119 | PSGroupSpecifier 120 | 121 | 122 | Title 123 | End of blank titles 124 | Type 125 | PSGroupSpecifier 126 | 127 | 128 | StringsTable 129 | ChildPane 130 | 131 | 132 | -------------------------------------------------------------------------------- /InAppSettingsTestApp/test_settings/Settings.bundle/InApp.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | StringsTable 6 | InApp 7 | PreferenceSpecifiers 8 | 9 | 10 | Type 11 | PSGroupSpecifier 12 | Title 13 | NORMALTITLE 14 | InAppTitle 15 | INAPPTITLE 16 | 17 | 18 | Type 19 | PSTitleValueSpecifier 20 | Title 21 | Don't Open 22 | InAppTitle 23 | OPEN 24 | Key 25 | testUrl 26 | DefaultValue 27 | InScopeApps {+} 28 | InAppURL 29 | http://www.inscopeapps.com 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /InAppSettingsTestApp/test_settings/Settings.bundle/Root.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | AutocapitalizationType 9 | Words 10 | AutocorrectionType 11 | Default 12 | DefaultValue 13 | Cap Words 14 | IsSecure 15 | 16 | Key 17 | textEntry_capword 18 | KeyboardType 19 | Alphabet 20 | Title 21 | AC=D 22 | Type 23 | PSTextFieldSpecifier 24 | 25 | 26 | AutocapitalizationType 27 | Sentences 28 | AutocorrectionType 29 | Yes 30 | DefaultValue 31 | Cap Sentences 32 | IsSecure 33 | 34 | Key 35 | textEntry_capsentance 36 | KeyboardType 37 | Alphabet 38 | Title 39 | Cap Sentences, AC=YES 40 | Type 41 | PSTextFieldSpecifier 42 | 43 | 44 | AutocapitalizationType 45 | AllCharacters 46 | AutocorrectionType 47 | No 48 | DefaultValue 49 | ALL CAPS 50 | IsSecure 51 | 52 | Key 53 | textEntry_allcaps 54 | KeyboardType 55 | Alphabet 56 | Title 57 | CAPS, AC=NO 58 | Type 59 | PSTextFieldSpecifier 60 | 61 | 62 | DefaultValue 63 | No AutocapitalizationType 64 | IsSecure 65 | 66 | Key 67 | textEntry_noautocorrect 68 | Title 69 | No Auto Caps or Correction 70 | Type 71 | PSTextFieldSpecifier 72 | 73 | 74 | AutocorrectionType 75 | no 76 | DefaultValue 77 | Secure 78 | IsSecure 79 | 80 | Key 81 | textEntry_secure 82 | KeyboardType 83 | Alphabet 84 | Title 85 | Secure 86 | Type 87 | PSTextFieldSpecifier 88 | 89 | 90 | AutocapitalizationType 91 | Sentences 92 | AutocorrectionType 93 | Default 94 | DefaultValue 95 | 12.6 96 | IsSecure 97 | 98 | Key 99 | textEntry_NumbersAndPunctuation 100 | KeyboardType 101 | NumbersAndPunctuation 102 | Title 103 | NumbersAndPunctuation 104 | Type 105 | PSTextFieldSpecifier 106 | 107 | 108 | AutocapitalizationType 109 | Sentences 110 | AutocorrectionType 111 | Default 112 | DefaultValue 113 | 12 114 | IsSecure 115 | 116 | Key 117 | textEntry_NumberPad 118 | KeyboardType 119 | NumberPad 120 | Title 121 | NumberPad 122 | Type 123 | PSTextFieldSpecifier 124 | 125 | 126 | AutocapitalizationType 127 | Sentences 128 | AutocorrectionType 129 | Default 130 | DefaultValue 131 | www.InScopeApps.com 132 | IsSecure 133 | 134 | Key 135 | textEntry_URL 136 | KeyboardType 137 | URL 138 | Title 139 | URL 140 | Type 141 | PSTextFieldSpecifier 142 | 143 | 144 | AutocapitalizationType 145 | Sentences 146 | AutocorrectionType 147 | Default 148 | DefaultValue 149 | mail@InScopeApps.com 150 | IsSecure 151 | 152 | Key 153 | textEntry_EmailAddress 154 | KeyboardType 155 | EmailAddress 156 | Title 157 | EmailAddress 158 | Type 159 | PSTextFieldSpecifier 160 | 161 | 162 | Type 163 | PSGroupSpecifier 164 | 165 | 166 | Title 167 | Title Values 168 | Type 169 | PSGroupSpecifier 170 | 171 | 172 | 173 | DefaultValue 174 | No title 175 | Key 176 | titleValue_notitle 177 | Type 178 | PSTitleValueSpecifier 179 | 180 | 181 | DefaultValue 182 | Read Only Value abcdefghjklmnop 183 | Key 184 | readOnly_key 185 | Title 186 | A 187 | Type 188 | PSTitleValueSpecifier 189 | 190 | 191 | DefaultValue 192 | Read Only Value 193 | Key 194 | readOnly2_key 195 | Title 196 | Read Only 197 | Type 198 | PSTitleValueSpecifier 199 | 200 | 201 | DefaultValue 202 | 2 203 | Key 204 | readOnly2_titleValue 205 | Title 206 | Titles-Value 207 | Titles 208 | 209 | Item 1 210 | Item 2 211 | Item 3 212 | 213 | Type 214 | PSTitleValueSpecifier 215 | Values 216 | 217 | 1 218 | 2 219 | 3 220 | 221 | 222 | 223 | DefaultValue 224 | 6 225 | Key 226 | readOnly2_titleValueOUtrange 227 | Title 228 | Out of Range 229 | Titles 230 | 231 | Item 1 232 | Item 2 233 | Item 3 234 | 235 | Type 236 | PSTitleValueSpecifier 237 | Values 238 | 239 | 1 240 | 2 241 | 3 242 | 243 | 244 | 245 | DefaultValue 246 | 2 247 | Key 248 | readOnly2_titleValuenotenoughtitles 249 | Title 250 | Not Enough Titles 251 | Titles 252 | 253 | Item 1 254 | 255 | Type 256 | PSTitleValueSpecifier 257 | Values 258 | 259 | 1 260 | 2 261 | 3 262 | 263 | 264 | 265 | DefaultValue 266 | 1 267 | Key 268 | readOnly2_titleValuenotenoughtitlesvaluddefault 269 | Title 270 | Not Enough, Valid Default 271 | Titles 272 | 273 | Item 1 274 | 275 | Type 276 | PSTitleValueSpecifier 277 | Values 278 | 279 | 1 280 | 2 281 | 3 282 | 283 | 284 | 285 | DefaultValue 286 | 2 287 | Key 288 | readOnly2_noValues 289 | Title 290 | No values 291 | Titles 292 | 293 | Item 1 294 | 295 | Type 296 | PSTitleValueSpecifier 297 | 298 | 299 | Title 300 | 301 | Type 302 | PSGroupSpecifier 303 | 304 | 305 | DefaultValue 306 | YES 307 | FalseValue 308 | NO 309 | Key 310 | toogle_string 311 | Title 312 | Toogle String 313 | TrueValue 314 | YES 315 | Type 316 | PSToggleSwitchSpecifier 317 | 318 | 319 | DefaultValue 320 | 1.23 321 | FalseValue 322 | 4.56 323 | Key 324 | toogle_realnumbers 325 | Title 326 | Real Numbers 327 | TrueValue 328 | 1.23 329 | Type 330 | PSToggleSwitchSpecifier 331 | 332 | 333 | DefaultValue 334 | 1.23 335 | Key 336 | toogle_realnumberstrue 337 | Title 338 | Real Numbers True 339 | TrueValue 340 | 1.23 341 | Type 342 | PSToggleSwitchSpecifier 343 | 344 | 345 | DefaultValue 346 | 1.23 347 | FalseValue 348 | 1.23 349 | Key 350 | toogle_realnumbersfalse 351 | Title 352 | Real Numbers False 353 | Type 354 | PSToggleSwitchSpecifier 355 | 356 | 357 | DefaultValue 358 | 359 | Key 360 | toogle_bool 361 | Title 362 | Toogle Bool 363 | Type 364 | PSToggleSwitchSpecifier 365 | 366 | 367 | DefaultValue 368 | CAT 369 | Key 370 | toogle_nofalse 371 | Title 372 | Toogle No False 373 | TrueValue 374 | DOG 375 | Type 376 | PSToggleSwitchSpecifier 377 | 378 | 379 | DefaultValue 380 | DOG 381 | FalseValue 382 | CAT 383 | Key 384 | toogle_notrue 385 | Title 386 | Toogle No True 387 | Type 388 | PSToggleSwitchSpecifier 389 | 390 | 391 | DefaultValue 392 | 1 393 | Key 394 | sliderMinGreaterThenMax_key 395 | MaximumValue 396 | 5 397 | MinimumValue 398 | 10 399 | Type 400 | PSSliderSpecifier 401 | 402 | 403 | DefaultValue 404 | 50 405 | Key 406 | slider_key 407 | MaximumValue 408 | 100 409 | MinimumValue 410 | 1 411 | Type 412 | PSSliderSpecifier 413 | 414 | 415 | DefaultValue 416 | 0 417 | Key 418 | slider_img 419 | MaximumValue 420 | 1 421 | MaximumValueImage 422 | bigdot.png 423 | MinimumValue 424 | 0 425 | MinimumValueImage 426 | littledot.png 427 | Type 428 | PSSliderSpecifier 429 | 430 | 431 | Title 432 | Group2 433 | Type 434 | PSGroupSpecifier 435 | 436 | 437 | DefaultValue 438 | 1 439 | Key 440 | colors_key 441 | Title 442 | Colors 443 | Titles 444 | 445 | VALUE_ONE 446 | VALUE_TWO 447 | VALUE_THREE 448 | 449 | Type 450 | PSMultiValueSpecifier 451 | Values 452 | 453 | 1 454 | 2 455 | 3 456 | 457 | 458 | 459 | DefaultValue 460 | 1 461 | Key 462 | no_title 463 | Title 464 | NOLABEL 465 | Titles 466 | 467 | Landscape 468 | Portrait 469 | Both 470 | 471 | Type 472 | PSMultiValueSpecifier 473 | Values 474 | 475 | 1 476 | 2 477 | 3 478 | 479 | 480 | 481 | DefaultValue 482 | 1 483 | Key 484 | no_localized_title 485 | Title 486 | 487 | Titles 488 | 489 | Localize 490 | English 491 | 492 | Type 493 | PSMultiValueSpecifier 494 | Values 495 | 496 | 1 497 | 2 498 | 499 | 500 | 501 | DefaultValue 502 | 1 503 | Key 504 | colors_empty 505 | Title 506 | empty 507 | Titles 508 | 509 | Type 510 | PSMultiValueSpecifier 511 | Values 512 | 513 | 514 | 515 | DefaultValue 516 | 1 517 | Key 518 | colors_notitle 519 | Title 520 | no titles 521 | Titles 522 | 523 | Type 524 | PSMultiValueSpecifier 525 | Values 526 | 527 | 1 528 | 2 529 | 3 530 | 531 | 532 | 533 | DefaultValue 534 | 1 535 | Key 536 | colors_novalues 537 | Title 538 | no values 539 | Titles 540 | 541 | Blue 542 | Red 543 | Green 544 | 545 | Type 546 | PSMultiValueSpecifier 547 | Values 548 | 549 | 550 | 551 | DefaultValue 552 | 1 553 | Key 554 | colors_mismatch 555 | Title 556 | missmatch 557 | Titles 558 | 559 | Blue 560 | Red 561 | Green 562 | 563 | Type 564 | PSMultiValueSpecifier 565 | Values 566 | 567 | 1 568 | 2 569 | 570 | 571 | 572 | File 573 | ChildPane 574 | Title 575 | Child Pane 576 | Type 577 | PSChildPaneSpecifier 578 | 579 | 580 | File 581 | InApp 582 | Title 583 | InApp 584 | Type 585 | PSChildPaneSpecifier 586 | 587 | 588 | DefaultValue 589 | 50 590 | Key 591 | slider_key 592 | MaximumValue 593 | 100 594 | MinimumValue 595 | 1 596 | Type 597 | PSSliderSpecifier 598 | 599 | 600 | File 601 | ChildPane 602 | Type 603 | PSChildPaneSpecifier 604 | 605 | 606 | Title 607 | No File 608 | Type 609 | PSChildPaneSpecifier 610 | 611 | 612 | File 613 | BadFile 614 | Title 615 | Bad File 616 | Type 617 | PSChildPaneSpecifier 618 | 619 | 620 | StringsTable 621 | Root 622 | 623 | 624 | -------------------------------------------------------------------------------- /InAppSettingsTestApp/test_settings/Settings.bundle/bigdot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kgn/InAppSettings/a7a9885df12d9ab575d9d093a640ca6d34b06f26/InAppSettingsTestApp/test_settings/Settings.bundle/bigdot.png -------------------------------------------------------------------------------- /InAppSettingsTestApp/test_settings/Settings.bundle/bigdot@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kgn/InAppSettings/a7a9885df12d9ab575d9d093a640ca6d34b06f26/InAppSettingsTestApp/test_settings/Settings.bundle/bigdot@2x.png -------------------------------------------------------------------------------- /InAppSettingsTestApp/test_settings/Settings.bundle/en.lproj/ChildPane.strings: -------------------------------------------------------------------------------- 1 | 2 | "LONGSTRING" = "New Pane - With a long group specifier string"; 3 | "TEXTENTRY" = "Enter text"; 4 | "READONLY" = "Read only"; 5 | "READONLYVALUE" = "Read only value"; 6 | "SPACE" = ""; 7 | "COLOR" = "Colors"; -------------------------------------------------------------------------------- /InAppSettingsTestApp/test_settings/Settings.bundle/en.lproj/InApp.strings: -------------------------------------------------------------------------------- 1 | 2 | "NORMALTITLE" = "This text shouldn't say anything about 'the next time the app is launched'"; 3 | "INAPPTITLE" = "These settings will take effect the next time the app is launched, not really :)"; 4 | "OPEN" = "Open"; -------------------------------------------------------------------------------- /InAppSettingsTestApp/test_settings/Settings.bundle/en.lproj/Root.strings: -------------------------------------------------------------------------------- 1 | /* A single strings file, whose title is specified in your preferences schema. The strings files provide the localized content to display to the user for each of your preferences. */ 2 | 3 | "Real Numbers" = "R34l Numb3rs"; 4 | "No File" = "No F1le"; 5 | "Cap Sentences, AC=YES" = "C4p S3nt3nc3s, AC=YES"; 6 | "Colors" = "Co1or5"; 7 | "NOLABEL" = ""; 8 | 9 | "VALUE_ONE" = "Red1"; 10 | "VALUE_TWO" = "Green2"; 11 | "VALUE_THREE" = "Blue3"; 12 | -------------------------------------------------------------------------------- /InAppSettingsTestApp/test_settings/Settings.bundle/littledot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kgn/InAppSettings/a7a9885df12d9ab575d9d093a640ca6d34b06f26/InAppSettingsTestApp/test_settings/Settings.bundle/littledot.png -------------------------------------------------------------------------------- /InAppSettingsTestApp/test_settings/Settings.bundle/littledot@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kgn/InAppSettings/a7a9885df12d9ab575d9d093a640ca6d34b06f26/InAppSettingsTestApp/test_settings/Settings.bundle/littledot@2x.png -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright David Keegan 2009-2010 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | InAppSettings 2 | ======== 3 | 4 | **InAppSettings** is an open source iPhone and iPod touch framework for displaying an 5 | in app version of the settings from the *Settings.bundle*. 6 | 7 | ![](https://github.com/kgn/InAppSettings/raw/master/Images/InAppSettings.png) 8 | 9 | There has been a lot of debate over whether an app's settings should be in the 10 | app or in the Settings app. **InAppSettings** is an open source framework determined 11 | to remedy this situation once and for all by easily allowing developers to have 12 | the same settings in the Settings app in in their app. **InAppSettings** uses the 13 | same *Settings.bundle* so there is no duplication of files or work. Simply add 14 | **InAppSettings** to the app's project and call it's view controler from code or 15 | Interface Builder and you're done! The **InAppSettings** wiki contains a full guide, 16 | including example code, for adding **InAppSettings** to an iPhone or iPod touch app. 17 | 18 | *By: David Keegan* 19 | 20 | With contributions from: 21 | 22 | * Shayne Sweeney 23 | * Hendrik Kueck 24 | * Peter Greis 25 | * Kurt Arnlund 26 | 27 | Features 28 | -------- 29 | * 100% re-implementation of the look and functionality of the Settings app. 30 | * Easily add **InAppSettings** to any navigation controller from code or Interface Builder, **InAppSettings** can also be displayed as a modal view. 31 | * Support for all versions of the iPhone and iPod Touch OS, 2.0+. 32 | * Support for settings language localization. 33 | * **InAppSettings** contains a class method for initializing all the user defaults in the *Settings.bundle*. 34 | * **InAppSettings** adds additional functionality to the *Settings.bundle* by adding optional values for in app titles and opening urls. 35 | * Sample project that demonstrates how to use **InAppSettings** from code, Interface Builder and a modal view. 36 | 37 | License 38 | -------- 39 | **InAppSettings** was developed by [David Keegan](http://davidkeegan.com) and is distributed under the [MIT license](http://www.opensource.org/licenses/mit-license.php) so it can be used in free or commercial apps. See the [LICENSE file](https://github.com/kgn/InAppSettings/blob/master/LICENSE) for more information. 40 | 41 | How to add InAppSettings to Your App 42 | ======== 43 | Drag **InAppSettings** into your project in Xcode. Make sure the dialog looks like this, then press 'Add'. 44 | 45 | ![](https://github.com/kgn/InAppSettings/raw/master/Images/xcodeadd.png) 46 | 47 | If you will be using **InAppSettings** in multiple projects, and I hope you do:), add **InAppSettings** to your *source trees* in the Xcode preferences. If you do this the 'add' settings should look like this, then press 'Add'. 48 | 49 | ![](https://github.com/kgn/InAppSettings/raw/master/Images/sourcetreeadd.png) 50 | 51 | InAppSettingsViewController 52 | -------- 53 | The `InAppSettingsViewController` is a subclass of the `UIViewController` that displays the settings from the *Settings.bundle*. It can be used from code and Interface Builder. 54 | 55 | **Using InAppSettingsViewController From Code** 56 | 57 | #import "InAppSettings.h" 58 | 59 | - (IBAction)showSettings{ 60 | InAppSettingsViewController *settings = [[InAppSettingsViewController alloc] init]; 61 | [self.navigationController pushViewController:settings animated:YES]; 62 | [settings release]; 63 | } 64 | 65 | **Using InAppSettingsViewController From Interface Builder** 66 | 67 | To use `InAppSettingsViewController` in Interface Builder, change the class type of any `UIViewController` to `InAppSettingsViewController`. 68 | 69 | ![](https://github.com/kgn/InAppSettings/raw/master/Images/ibadd.png) 70 | 71 | To work correctly the `InAppSettingsViewController` must be added to an existing `UINavigationController`. 72 | 73 | **InAppSettingsTestApp** demonstrates how to use `InAppSettingsViewController` from code and Interface Builder. 74 | 75 | InAppSettingsModalViewController 76 | -------- 77 | The `InAppSettingsModalViewController` is a subclass of `UIViewController` that creates its own `UINavigationController`. It is designed to be used as a modal view and is created with a 'Done' button that will dismiss the view. 78 | 79 | **How to use InAppSettingsModalViewController from code** 80 | 81 | #import "InAppSettings.h" 82 | 83 | - (IBAction)presentSettings{ 84 | InAppSettingsModalViewController *settings = [[InAppSettingsModalViewController alloc] init]; 85 | [self presentModalViewController:settings animated:YES]; 86 | [settings release]; 87 | } 88 | 89 | The `InAppSettingsModalViewController` should not be used from Interface Builder. 90 | 91 | **InAppSettingsTestApp** demonstrates how to use `InAppSettingsModalViewController` as a modal view. 92 | 93 | [InAppSettings registerDefaults] 94 | -------- 95 | The user defaults from the *Settings.bundle* are not initialized on startup, and are only initialized when viewed in the Settings App. **InAppSettings** has a registerDefaults class method that can be called to initialize all of the user defaults from the *Settings.bundle*. 96 | 97 | **How to use [InAppSettings registerDefaults] from code** 98 | 99 | The **InAppSettings** `registerDefaults` method should be called from the AppDelegate's initialize method. 100 | 101 | #import "InAppSettings.h" 102 | 103 | + (void)initialize{ 104 | if([self class] == [AppDelegate class]){ 105 | [InAppSettings registerDefaults]; 106 | } 107 | } 108 | 109 | The name of the 'AppDelegate' will need to change to the name of the app's AppDelegate class. 110 | 111 | Custom settings specifier keys 112 | ======== 113 | InAppTitle 114 | -------- 115 | `InAppTitle` is an optional settings specifier key that can be added to any settings specifier. If present this title will be used in **InAppSettings**. 116 | 117 | 118 | Type 119 | PSGroupSpecifier 120 | Title 121 | Change the theme of the app 122 | InAppTitle 123 | Change the theme of the app, these changes will take effect the next time the app is launched 124 | 125 | 126 | The Settings app will display: "Change the theme of the app", but **InAppSettings** will display: "Change the theme of the app, these changes will take effect the next time the app is launched". 127 | 128 | InAppURL 129 | -------- 130 | `InAppTitle` is an optional settings specifier key that can be added to `PSTitleValueSpecifier`. If present a disclosure indicator will be added to the cell, and the specified url will be opened when the cell is tapped. 131 | 132 | 133 | Type 134 | PSTitleValueSpecifier 135 | Title 136 | Created by: 137 | Key 138 | testUrl 139 | DefaultValue 140 | kgn {+} 141 | InAppURL 142 | http://www.kgn.com 143 | 144 | 145 | To open a webpage the url MUST startwith "http://". 146 | 147 | **InAppSettingsTestApp** 148 | -------- 149 | The **InAppSettingsTestApp** is a Xcode project for testing **InAppSettings**. It also demonstrates all the ways to use the **InAppSettings** view controllers and class methods. 150 | --------------------------------------------------------------------------------