Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updated InAppSettingsKit to the latest version

  • Loading branch information...
commit 083f7211a7b598530c3daeb3a961ededb2f804bf 1 parent 87ebef8
Adrian Kosmaczewski authored
Showing with 517 additions and 205 deletions.
  1. +8 −4 Externals/InAppSettingsKit/Controllers/IASKAppSettingsViewController.h
  2. +198 −112 Externals/InAppSettingsKit/Controllers/IASKAppSettingsViewController.m
  3. +7 −0 Externals/InAppSettingsKit/Controllers/IASKSpecifierValuesViewController.m
  4. +18 −6 Externals/InAppSettingsKit/Models/IASKSettingsReader.h
  5. +19 −10 Externals/InAppSettingsKit/Models/IASKSettingsReader.m
  6. +1 −1  Externals/InAppSettingsKit/Models/IASKSpecifier.h
  7. +19 −9 Externals/InAppSettingsKit/Models/IASKSpecifier.m
  8. +35 −16 Externals/InAppSettingsKit/Views/IASKPSSliderSpecifierViewCell.m
  9. +13 −8 Externals/InAppSettingsKit/Views/IASKPSTextFieldSpecifierViewCell.m
  10. +22 −0 Externals/InAppSettingsKit/Views/IASKPSTitleValueSpecifierViewCell.h
  11. +54 −0 Externals/InAppSettingsKit/Views/IASKPSTitleValueSpecifierViewCell.m
  12. +1 −1  Externals/InAppSettingsKit/Views/IASKPSToggleSwitchSpecifierViewCell.m
  13. +0 −1  Externals/InAppSettingsKit/Views/IASKTextField.m
  14. +64 −9 Externals/InAppSettingsKit/Xibs/IASKAppSettingsView.xib
  15. +7 −6 Externals/InAppSettingsKit/Xibs/IASKPSSliderSpecifierViewCell.xib
  16. +45 −17 Externals/InAppSettingsKit/Xibs/IASKPSTextFieldSpecifierViewCell.xib
  17. +6 −5 Externals/InAppSettingsKit/Xibs/IASKPSToggleSwitchSpecifierViewCell.xib
12 Externals/InAppSettingsKit/Controllers/IASKAppSettingsViewController.h
View
@@ -24,19 +24,18 @@
@end
-@interface IASKAppSettingsViewController : UIViewController <UITextFieldDelegate> {
+@interface IASKAppSettingsViewController : UIViewController <UITextFieldDelegate, UINavigationControllerDelegate> {
id<IASKSettingsDelegate> _delegate;
IBOutlet UITableView *_tableView;
NSMutableArray *_viewList;
NSIndexPath *_currentIndexPath;
- CGFloat animatedDistance;
- CGRect viewFrameBeforeAnimation;
+ NSIndexPath *_topmostRowBeforeKeyboardWasShown;
IASKSettingsReader *_settingsReader;
NSString *_file;
- id currentFirstResponder;
+ id _currentFirstResponder;
BOOL _showCreditsFooter;
BOOL _showDoneButton;
@@ -52,4 +51,9 @@
- (IBAction)dismiss:(id)sender;
+// subclassing: optionally override these methods to customize appearance and functionality
+- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath;
+- (NSIndexPath *)tableView:(UITableView *)tableView willSelectRowAtIndexPath:(NSIndexPath *)indexPath;
+- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath;
+
@end
310 Externals/InAppSettingsKit/Controllers/IASKAppSettingsViewController.m
View
@@ -2,7 +2,7 @@
// IASKAppSettingsViewController.m
// http://www.inappsettingskit.com
//
-// Copyright (c) 2009:
+// Copyright (c) 2009-2010:
// Luc Vandal, Edovia Inc., http://www.edovia.com
// Ortwin Gentz, FutureTap GmbH, http://www.futuretap.com
// All rights reserved.
@@ -20,16 +20,16 @@
#import "IASKPSToggleSwitchSpecifierViewCell.h"
#import "IASKPSSliderSpecifierViewCell.h"
#import "IASKPSTextFieldSpecifierViewCell.h"
+#import "IASKPSTitleValueSpecifierViewCell.h"
#import "IASKSwitch.h"
#import "IASKSlider.h"
#import "IASKSpecifier.h"
#import "IASKSpecifierValuesViewController.h"
+#import "IASKTextField.h"
static const CGFloat KEYBOARD_ANIMATION_DURATION = 0.3;
static const CGFloat MINIMUM_SCROLL_FRACTION = 0.2;
static const CGFloat MAXIMUM_SCROLL_FRACTION = 0.8;
-static const CGFloat PORTRAIT_KEYBOARD_HEIGHT = 166;
-static const CGFloat LANDSCAPE_KEYBOARD_HEIGHT = 162;
static NSString *kIASKCredits = @"Powered by InAppSettingsKit"; // Leave this as-is!!!
@@ -40,6 +40,8 @@
@interface IASKAppSettingsViewController ()
- (void)_textChanged:(id)sender;
+- (void)_keyboardWillShow:(NSNotification*)notification;
+- (void)_keyboardWillHide:(NSNotification*)notification;
@end
@implementation IASKAppSettingsViewController
@@ -48,7 +50,7 @@ @implementation IASKAppSettingsViewController
@synthesize currentIndexPath=_currentIndexPath;
@synthesize settingsReader = _settingsReader;
@synthesize file = _file;
-@synthesize currentFirstResponder;
+@synthesize currentFirstResponder = _currentFirstResponder;
@synthesize showCreditsFooter = _showCreditsFooter;
@synthesize showDoneButton = _showDoneButton;
@@ -67,14 +69,16 @@ - (NSString*)file {
return [[_file retain] autorelease];
}
-- (void)setFile:(NSString *)file
-{
- [_file release];
- _file = [file copy];
+- (void)setFile:(NSString *)file {
+ if (file != _file) {
+ [_file release];
+ _file = [file copy];
+ }
self.settingsReader = nil; // automatically initializes itself
}
+#pragma mark standard view controller methods
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
if ([super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) {
// If set to YES, will display credits for InAppSettingsKit creators
@@ -86,6 +90,16 @@ - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
return self;
}
+- (void)awakeFromNib {
+ // If set to YES, will display credits for InAppSettingsKit creators
+ _showCreditsFooter = YES;
+
+ // If set to YES, will add a DONE button at the right of the navigation bar
+ // if loaded via NIB, it's likely we sit in a TabBar- or NavigationController
+ // and thus don't need the Done button
+ _showDoneButton = NO;
+}
+
- (void)viewDidLoad {
[super viewDidLoad];
@@ -93,23 +107,64 @@ - (void)viewDidLoad {
_viewList = [[NSMutableArray alloc] init];
[_viewList addObject:[NSDictionary dictionaryWithObjectsAndKeys:@"IASKSpecifierValuesView", @"ViewName",nil]];
[_viewList addObject:[NSDictionary dictionaryWithObjectsAndKeys:@"IASKAppSettingsView", @"ViewName",nil]];
+
+}
+
+- (void)viewDidUnload {
+ // Release any retained subviews of the main view.
+ // e.g. self.myOutlet = nil;
}
- (void)viewWillAppear:(BOOL)animated {
if (_tableView) {
[_tableView reloadData];
+ _tableView.frame = self.view.bounds;
}
+ self.navigationItem.rightBarButtonItem = nil;
+ self.navigationController.delegate = nil;
if ([self.file isEqualToString:@"Root"]) {
+ self.navigationController.delegate = self;
if (_showDoneButton) {
UIBarButtonItem *buttonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone
target:self
action:@selector(dismiss:)];
self.navigationItem.rightBarButtonItem = buttonItem;
[buttonItem release];
- }
- self.title = NSLocalizedString(@"Settings", @"");
+ }
+ if (!self.title) {
+ self.title = NSLocalizedString(@"Settings", @"");
+ }
+ }
+ [super viewWillAppear:animated];
+}
+
+- (void)viewDidAppear:(BOOL)animated {
+ [_tableView flashScrollIndicators];
+// _tableView.frame = self.view.bounds;
+ [super viewDidAppear:animated];
+
+ [[NSNotificationCenter defaultCenter] addObserver:self
+ selector:@selector(_keyboardWillShow:)
+ name:UIKeyboardWillShowNotification
+ object:nil];
+ [[NSNotificationCenter defaultCenter] addObserver:self
+ selector:@selector(_keyboardWillHide:)
+ name:UIKeyboardWillHideNotification
+ object:nil];
+}
+
+- (void)viewWillDisappear:(BOOL)animated {
+ [[NSNotificationCenter defaultCenter] removeObserver:self name:UIKeyboardWillShowNotification object:nil];
+ if ([self.currentFirstResponder canResignFirstResponder]) {
+ [self.currentFirstResponder resignFirstResponder];
}
+ [super viewWillDisappear:animated];
+}
+
+- (void)viewDidDisappear:(BOOL)animated {
+ [[NSNotificationCenter defaultCenter] removeObserver:self name:UIKeyboardWillHideNotification object:nil];
+ [super viewDidDisappear:animated];
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
@@ -123,12 +178,12 @@ - (void)didReceiveMemoryWarning {
// Release any cached data, images, etc that aren't in use.
}
-- (void)viewDidUnload {
- // Release any retained subviews of the main view.
- // e.g. self.myOutlet = nil;
+- (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated {
+ if (![viewController isKindOfClass:[IASKAppSettingsViewController class]] && ![viewController isKindOfClass:[IASKSpecifierValuesViewController class]]) {
+ [self dismiss:nil];
+ }
}
-
- (void)dealloc {
[[NSNotificationCenter defaultCenter] removeObserver:self];
[_viewList release];
@@ -136,9 +191,10 @@ - (void)dealloc {
[_file release];
_file = nil;
- [currentFirstResponder release];
- currentFirstResponder = nil;
+ [_currentFirstResponder release];
+ _currentFirstResponder = nil;
+ self.settingsReader = nil;
_delegate = nil;
[super dealloc];
@@ -153,6 +209,8 @@ - (IBAction)dismiss:(id)sender {
[self.currentFirstResponder resignFirstResponder];
}
+ self.navigationController.delegate = nil;
+
if (self.delegate && [self.delegate conformsToProtocol:@protocol(IASKSettingsDelegate)]) {
[self.delegate settingsViewControllerDidEnd:self];
}
@@ -203,13 +261,6 @@ - (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInte
return [self.settingsReader titleForSection:section];
}
-/*- (NSString *)tableView:(UITableView *)tableView titleForFooterInSection:(NSInteger)section {
- if (!_showCreditsFooter || section != [self.settingsReader numberOfSections]-1) return nil;
-
- // Show the credits only in the last section's footer
- return kIASKCredits;
-}*/
-
- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section {
if (!_showCreditsFooter || section != [self.settingsReader numberOfSections]-1) return nil;
@@ -285,29 +336,38 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
return cell;
}
else if ([[specifier type] isEqualToString:kIASKPSMultiValueSpecifier]) {
- UITableViewCell *cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:kIASKPSMultiValueSpecifier] autorelease];
- [[cell textLabel] setText:[specifier title]];
- [[cell detailTextLabel] setText:[specifier titleForCurrentValue:[[NSUserDefaults standardUserDefaults] objectForKey:key] != nil ?
- [[NSUserDefaults standardUserDefaults] objectForKey:key] : [specifier defaultStringValue]]];
-
- // left align the value if the title is empty
- if (!specifier.title.length) {
- cell.textLabel.text = cell.detailTextLabel.text;
- cell.textLabel.font = [UIFont systemFontOfSize:[UIFont labelFontSize]];
- cell.textLabel.textColor = cell.detailTextLabel.textColor;
- cell.detailTextLabel.text = nil;
+ UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:[specifier type]];
+
+ if (!cell) {
+ cell = [[[IASKPSTitleValueSpecifierViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:[specifier type]] autorelease];
+ cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
}
- //NSLog(@"[[NSUserDefaults standardUserDefaults] objectForKey:key]: %@", [[NSUserDefaults standardUserDefaults] objectForKey:key]);
- //NSLog(@"[specifier defaultValue]: %@", [specifier defaultValue]);
- [cell setAccessoryType:UITableViewCellAccessoryDisclosureIndicator];
+ [[cell textLabel] setText:[specifier title]];
+ [[cell detailTextLabel] setText:[[specifier titleForCurrentValue:[[NSUserDefaults standardUserDefaults] objectForKey:key] != nil ?
+ [[NSUserDefaults standardUserDefaults] objectForKey:key] : [specifier defaultValue]] description]];
return cell;
}
else if ([[specifier type] isEqualToString:kIASKPSTitleValueSpecifier]) {
- UITableViewCell *cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:kIASKPSTitleValueSpecifier] autorelease];
- [[cell textLabel] setText:[specifier title]];
- [[cell detailTextLabel] setText:[specifier defaultStringValue]];
- [cell setUserInteractionEnabled:NO];
- [cell setAccessoryType:UITableViewCellAccessoryNone];
+ UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:[specifier type]];
+
+ if (!cell) {
+ cell = [[[IASKPSTitleValueSpecifierViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:[specifier type]] autorelease];
+ cell.accessoryType = UITableViewCellAccessoryNone;
+ }
+
+ cell.textLabel.text = [specifier title];
+ id value = [[NSUserDefaults standardUserDefaults] objectForKey:key] ? : [specifier defaultValue];
+
+ NSString *stringValue;
+ if ([specifier multipleValues] || [specifier multipleTitles]) {
+ stringValue = [specifier titleForCurrentValue:value];
+ } else {
+ stringValue = [value description];
+ }
+
+ cell.detailTextLabel.text = stringValue;
+ [cell setUserInteractionEnabled:NO];
+
return cell;
}
else if ([[specifier type] isEqualToString:kIASKPSTextFieldSpecifier]) {
@@ -317,6 +377,9 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
cell = (IASKPSTextFieldSpecifierViewCell*) [[[NSBundle mainBundle] loadNibNamed:@"IASKPSTextFieldSpecifierViewCell"
owner:self
options:nil] objectAtIndex:0];
+ cell.textField.textAlignment = UITextAlignmentLeft;
+ cell.textField.returnKeyType = UIReturnKeyDone;
+ cell.accessoryType = UITableViewCellAccessoryNone;
}
[[cell label] setText:[specifier title]];
[[cell textField] setText:[[NSUserDefaults standardUserDefaults] objectForKey:key] != nil ?
@@ -328,69 +391,57 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
[[cell textField] setKeyboardType:[specifier keyboardType]];
[[cell textField] setAutocapitalizationType:[specifier autocapitalizationType]];
[[cell textField] setAutocorrectionType:[specifier autoCorrectionType]];
- [[cell textField] setTextAlignment:UITextAlignmentLeft];
- [[cell textField] setReturnKeyType:UIReturnKeyDone];
- [cell setAccessoryType:UITableViewCellAccessoryNone];
- return cell;
- }
- else if ([[specifier type] isEqualToString:kIASKPSSliderSpecifier]) {
+ [cell setNeedsLayout];
+ return cell;
+ }
+ else if ([[specifier type] isEqualToString:kIASKPSSliderSpecifier]) {
IASKPSSliderSpecifierViewCell *cell = (IASKPSSliderSpecifierViewCell*)[tableView dequeueReusableCellWithIdentifier:[specifier type]];
- CGRect sliderFrame;
if (!cell) {
cell = (IASKPSSliderSpecifierViewCell*) [[[NSBundle mainBundle] loadNibNamed:@"IASKPSSliderSpecifierViewCell"
owner:self
options:nil] objectAtIndex:0];
- }
-
- sliderFrame = [[cell slider] frame];
- sliderFrame.origin.x = kIASKSliderNoImagesX;
- sliderFrame.size.width = kIASKSliderNoImagesWidth;
+ }
- // Check if there are min and max images. If so, change the layout accordingly.
- if ([[specifier minimumValueImage] length] > 0 && [[specifier maximumValueImage] length] > 0) {
- // Both images
- [[cell minImage] setImage:[UIImage imageWithContentsOfFile:[_settingsReader pathForImageNamed:[specifier minimumValueImage]]]];
- [[cell maxImage] setImage:[UIImage imageWithContentsOfFile:[_settingsReader pathForImageNamed:[specifier maximumValueImage]]]];
- [[cell minImage] setHidden:NO];
- [[cell maxImage] setHidden:NO];
- sliderFrame.origin.x = kIASKSliderBothImagesX;
- sliderFrame.size.width = kIASKSliderBothImagesWidth;
- }
- else if ([[specifier minimumValueImage] length] > 0) {
- // Min image
+ if ([[specifier minimumValueImage] length] > 0) {
[[cell minImage] setImage:[UIImage imageWithContentsOfFile:[_settingsReader pathForImageNamed:[specifier minimumValueImage]]]];
- [[cell minImage] setHidden:NO];
- [[cell maxImage] setHidden:YES];
- sliderFrame.origin.x = kIASKSliderBothImagesX;
- sliderFrame.size.width = kIASKSliderOneImageWidth;
}
- else if ([[specifier maximumValueImage] length] > 0) {
- // Max image
+
+ if ([[specifier maximumValueImage] length] > 0) {
[[cell maxImage] setImage:[UIImage imageWithContentsOfFile:[_settingsReader pathForImageNamed:[specifier maximumValueImage]]]];
- [[cell minImage] setHidden:YES];
- [[cell maxImage] setHidden:NO];
- sliderFrame.origin.x = kIASKSliderNoImagesX;
- sliderFrame.size.width = kIASKSliderOneImageWidth;
}
- [[cell slider] setFrame:sliderFrame];
[[cell slider] setMinimumValue:[specifier minimumValue]];
[[cell slider] setMaximumValue:[specifier maximumValue]];
[[cell slider] setValue:[[NSUserDefaults standardUserDefaults] objectForKey:key] != nil ?
[[[NSUserDefaults standardUserDefaults] objectForKey:key] floatValue] : [[specifier defaultValue] floatValue]];
[[cell slider] addTarget:self action:@selector(sliderChangedValue:) forControlEvents:UIControlEventValueChanged];
[[cell slider] setKey:key];
+ [cell setNeedsLayout];
return cell;
}
else if ([[specifier type] isEqualToString:kIASKPSChildPaneSpecifier]) {
- UITableViewCell *cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:kIASKPSChildPaneSpecifier] autorelease];
+ UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:[specifier type]];
+
+ if (!cell) {
+ cell = [[[IASKPSTitleValueSpecifierViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:[specifier type]] autorelease];
+ [cell setAccessoryType:UITableViewCellAccessoryDisclosureIndicator];
+ }
+
[[cell textLabel] setText:[specifier title]];
- NSLog(@"[specifier file]: %@", [specifier file]);
- [cell setAccessoryType:UITableViewCellAccessoryDisclosureIndicator];
return cell;
- }
- else {
+ } else if ([[specifier type] isEqualToString:kIASKOpenURLSpecifier]) {
+ UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:[specifier type]];
+
+ if (!cell) {
+ cell = [[[IASKPSTitleValueSpecifierViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:[specifier type]] autorelease];
+ [cell setAccessoryType:UITableViewCellAccessoryDisclosureIndicator];
+ }
+
+ cell.textLabel.text = [specifier title];
+ cell.detailTextLabel.text = [[specifier defaultValue] description];
+ return cell;
+ } else {
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:[specifier type]];
if (!cell) {
@@ -457,7 +508,7 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
NSMutableDictionary *newItemDict = [NSMutableDictionary dictionaryWithCapacity:3];
[newItemDict addEntriesFromDictionary: [_viewList objectAtIndex:kIASKSpecifierChildViewControllerIndex]]; // copy the title and explain strings
- targetViewController = [[IASKAppSettingsViewController alloc] initWithNibName:@"IASKAppSettingsView" bundle:nil];
+ targetViewController = [[[self class] alloc] initWithNibName:@"IASKAppSettingsView" bundle:nil];
// add the new view controller to the dictionary and then to the 'viewList' array
[newItemDict setObject:targetViewController forKey:@"viewController"];
@@ -472,8 +523,10 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
targetViewController.title = specifier.title;
targetViewController.showCreditsFooter = NO;
[[self navigationController] pushViewController:targetViewController animated:YES];
- }
- else {
+ } else if ([[specifier type] isEqualToString:kIASKOpenURLSpecifier]) {
+ [tableView deselectRowAtIndexPath:indexPath animated:YES];
+ [[UIApplication sharedApplication] openURL:[NSURL URLWithString:specifier.file]];
+ } else {
[tableView deselectRowAtIndexPath:indexPath animated:NO];
}
}
@@ -489,41 +542,23 @@ - (void)_textChanged:(id)sender {
}
- (BOOL)textFieldShouldBeginEditing:(UITextField *)textField {
+ [textField setTextAlignment:UITextAlignmentLeft];
+ self.currentFirstResponder = textField;
return YES;
}
- (void)textFieldDidBeginEditing:(UITextField *)textField {
- self.currentFirstResponder = textField;
-
- viewFrameBeforeAnimation = self.view.frame;
-
- UIInterfaceOrientation orientation = [[UIApplication sharedApplication] statusBarOrientation];
-
- CGRect viewFrame = viewFrameBeforeAnimation;
- viewFrame.size.height -= (orientation == UIInterfaceOrientationPortrait) ? PORTRAIT_KEYBOARD_HEIGHT : LANDSCAPE_KEYBOARD_HEIGHT;
-
- UITableViewCell *textFieldCell = (id)textField.superview.superview;
- NSIndexPath *textFieldIndexPath = [_tableView indexPathForCell:textFieldCell];
-
- [UIView beginAnimations:nil context:NULL];
- [UIView setAnimationBeginsFromCurrentState:YES];
- [UIView setAnimationDuration:KEYBOARD_ANIMATION_DURATION];
-
- [_tableView setFrame:viewFrame];
- [_tableView scrollToRowAtIndexPath:textFieldIndexPath atScrollPosition:UITableViewScrollPositionMiddle animated:YES];
-
- [UIView commitAnimations];
+ if ([_tableView indexPathsForVisibleRows].count) {
+ _topmostRowBeforeKeyboardWasShown = (NSIndexPath*)[[_tableView indexPathsForVisibleRows] objectAtIndex:0];
+ } else {
+ // this should never happen
+ _topmostRowBeforeKeyboardWasShown = [NSIndexPath indexPathForRow:0 inSection:0];
+ [textField resignFirstResponder];
+ }
}
- (void)textFieldDidEndEditing:(UITextField *)textField {
self.currentFirstResponder = nil;
-
- [UIView beginAnimations:nil context:NULL];
- [UIView setAnimationBeginsFromCurrentState:YES];
- [UIView setAnimationDuration:KEYBOARD_ANIMATION_DURATION];
-
- [_tableView setFrame:viewFrameBeforeAnimation];
- [UIView commitAnimations];
}
- (BOOL)textFieldShouldReturn:(UITextField *)textField{
@@ -531,4 +566,55 @@ - (BOOL)textFieldShouldReturn:(UITextField *)textField{
return YES;
}
+#pragma mark Keyboard Management
+- (void)_keyboardWillShow:(NSNotification*)notification {
+ if (self.navigationController.topViewController == self) {
+ NSDictionary* userInfo = [notification userInfo];
+
+ // we don't use SDK constants here to be universally compatible with all SDKs ≥ 3.0
+ NSValue* keyboardFrameValue = [userInfo objectForKey:@"UIKeyboardBoundsUserInfoKey"];
+ if (!keyboardFrameValue) {
+ keyboardFrameValue = [userInfo objectForKey:@"UIKeyboardFrameEndUserInfoKey"];
+ }
+
+ // Reduce the tableView height by the part of the keyboard that actually covers the tableView
+ CGRect windowRect = [[UIApplication sharedApplication] keyWindow].bounds;
+ CGRect viewRectAbsolute = [_tableView convertRect:_tableView.bounds toView:[[UIApplication sharedApplication] keyWindow]];
+ CGRect frame = _tableView.frame;
+ frame.size.height -= [keyboardFrameValue CGRectValue].size.height - CGRectGetMaxY(windowRect) + CGRectGetMaxY(viewRectAbsolute);
+
+ [UIView beginAnimations:nil context:NULL];
+ [UIView setAnimationDuration:[[userInfo objectForKey:UIKeyboardAnimationDurationUserInfoKey] doubleValue]];
+ [UIView setAnimationCurve:[[userInfo objectForKey:UIKeyboardAnimationCurveUserInfoKey] intValue]];
+ _tableView.frame = frame;
+ [UIView commitAnimations];
+
+ UITableViewCell *textFieldCell = (id)((UITextField *)self.currentFirstResponder).superview.superview;
+ NSIndexPath *textFieldIndexPath = [_tableView indexPathForCell:textFieldCell];
+
+ // iOS 3 sends hide and show notifications right after each other
+ // when switching between textFields, so cancel -scrollToOldPosition requests
+ [NSObject cancelPreviousPerformRequestsWithTarget:self];
+
+ [_tableView scrollToRowAtIndexPath:textFieldIndexPath atScrollPosition:UITableViewScrollPositionMiddle animated:YES];
+ }
+}
+
+- (void) scrollToOldPosition {
+ [_tableView scrollToRowAtIndexPath:_topmostRowBeforeKeyboardWasShown atScrollPosition:UITableViewScrollPositionTop animated:YES];
+}
+
+- (void)_keyboardWillHide:(NSNotification*)notification {
+ if (self.navigationController.topViewController == self) {
+ NSDictionary* userInfo = [notification userInfo];
+
+ [UIView beginAnimations:nil context:NULL];
+ [UIView setAnimationDuration:[[userInfo objectForKey:UIKeyboardAnimationDurationUserInfoKey] doubleValue]];
+ [UIView setAnimationCurve:[[userInfo objectForKey:UIKeyboardAnimationCurveUserInfoKey] intValue]];
+ _tableView.frame = self.view.bounds;
+ [UIView commitAnimations];
+
+ [self performSelector:@selector(scrollToOldPosition) withObject:nil afterDelay:0.1];
+ }
+}
@end
7 Externals/InAppSettingsKit/Controllers/IASKSpecifierValuesViewController.m
View
@@ -49,8 +49,15 @@ - (void)viewWillAppear:(BOOL)animated {
if (_tableView) {
[_tableView reloadData];
}
+ [super viewWillAppear:animated];
}
+- (void)viewDidAppear:(BOOL)animated {
+ [_tableView flashScrollIndicators];
+ [super viewDidAppear:animated];
+}
+
+
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return (interfaceOrientation == UIInterfaceOrientationPortrait) || (interfaceOrientation == UIInterfaceOrientationPortraitUpsideDown);
}
24 Externals/InAppSettingsKit/Models/IASKSettingsReader.h
View
@@ -29,7 +29,7 @@
#define kIASKIsSecure @"IsSecure"
#define KIASKKeyboardType @"KeyboardType"
#define kIASKAutocapitalizationType @"AutocapitalizationType"
-#define kIASKAutoCorrectionType @"AutoCorrectionType"
+#define kIASKAutoCorrectionType @"AutocorrectionType"
#define kIASKValues @"Values"
#define kIASKTitles @"Titles"
#define kIASKKeyboardAlphabet @"Alphabet"
@@ -53,26 +53,37 @@
#define kIASKPSSliderSpecifier @"PSSliderSpecifier"
#define kIASKPSTitleValueSpecifier @"PSTitleValueSpecifier"
#define kIASKPSTextFieldSpecifier @"PSTextFieldSpecifier"
-
#define kIASKPSChildPaneSpecifier @"PSChildPaneSpecifier"
+#define kIASKOpenURLSpecifier @"IASKOpenURLSpecifier"
#define kIASKBundleFolder @"Settings.bundle"
+#define kIASKBundleFolderAlt @"InAppSettings.bundle"
#define kIASKBundleFilename @"Root.plist"
#define kIASKAppSettingChanged @"kAppSettingChanged"
#define kIASKSectionHeaderIndex 0
-#define kIASKSliderNoImagesX 11
+#define kIASKSliderNoImagesX 21
#define kIASKSliderNoImagesWidth 278
-#define kIASKSliderBothImagesX 45
-#define kIASKSliderBothImagesWidth 210
-#define kIASKSliderOneImageWidth 244
+#define kIASKSliderBothImagesX 53
+#define kIASKSliderBothImagesWidth 214
+#define kIASKSliderOneImageWidth 246
+
+#define kIASKTableWidth 320
+#define kIASKSpacing 5
+#define kIASKMinLabelWidth 97
+#define kIASKMinValueWidth 35
+#define kIASKPaddingLeft 9
+#define kIASKPaddingRight 10
+
+#define kIASKLabelFontSize 17
@class IASKSpecifier;
@interface IASKSettingsReader : NSObject {
NSString *_path;
+ NSString *_bundleFolder;
NSDictionary *_settingsBundle;
NSArray *_dataSource;
NSBundle *_bundle;
@@ -89,6 +100,7 @@
- (NSString*)pathForImageNamed:(NSString*)image;
@property (nonatomic, retain) NSString *path;
+@property (nonatomic, retain) NSString *bundleFolder;
@property (nonatomic, retain) NSDictionary *settingsBundle;
@property (nonatomic, retain) NSArray *dataSource;
29 Externals/InAppSettingsKit/Models/IASKSettingsReader.m
View
@@ -24,7 +24,8 @@ - (BOOL)_sectionHasHeading:(NSInteger)section;
@implementation IASKSettingsReader
-@synthesize path=_path,
+@synthesize path=_path,
+bundleFolder=_bundleFolder,
settingsBundle=_settingsBundle,
dataSource=_dataSource;
@@ -33,15 +34,23 @@ - (id)init {
}
- (id)initWithFile:(NSString*)file {
- if (self=[super init]) {
- // Generate the settings bundle path
- NSString *path = [self bundlePath];
-
- [self setPath:[path stringByAppendingPathComponent:[file stringByAppendingString:@".inApp.plist"]]];
- [self setSettingsBundle:[NSDictionary dictionaryWithContentsOfFile:[self path]]];
- if (!self.settingsBundle) {
- [self setPath:[path stringByAppendingPathComponent:[file stringByAppendingString:@".plist"]]];
+ if ((self=[super init])) {
+ [self setBundleFolder:kIASKBundleFolderAlt];
+ // Generate the settings bundle path
+ NSString *path = [self bundlePath];
+
+ // Try both bundle folders
+ for (int i=0;i<2;i++) {
+ [self setPath:[path stringByAppendingPathComponent:[file stringByAppendingString:@".inApp.plist"]]];
[self setSettingsBundle:[NSDictionary dictionaryWithContentsOfFile:[self path]]];
+ if (!self.settingsBundle) {
+ [self setPath:[path stringByAppendingPathComponent:[file stringByAppendingString:@".plist"]]];
+ [self setSettingsBundle:[NSDictionary dictionaryWithContentsOfFile:[self path]]];
+ }
+ if (self.settingsBundle)
+ break;
+ [self setBundleFolder:kIASKBundleFolder];
+ path = [self bundlePath];
}
_bundle = [[NSBundle bundleWithPath:path] retain];
@@ -138,7 +147,7 @@ - (NSString*)titleForStringId:(NSString*)stringId {
- (NSString*)bundlePath {
NSString *libDirectory = [[NSBundle mainBundle] bundlePath];
- return [libDirectory stringByAppendingPathComponent:kIASKBundleFolder];
+ return [libDirectory stringByAppendingPathComponent:_bundleFolder];
}
- (NSString*)pathForImageNamed:(NSString*)image {
2  Externals/InAppSettingsKit/Models/IASKSpecifier.h
View
@@ -24,7 +24,7 @@
IASKSettingsReader *_settingsReader;
}
@property (nonatomic, retain) NSDictionary *specifierDict;
-@property (nonatomic, retain) IASKSettingsReader *settingsReader;
+@property (nonatomic, assign) IASKSettingsReader *settingsReader;
- (id)initWithSpecifier:(NSDictionary*)specifier;
- (NSString*)title;
28 Externals/InAppSettingsKit/Models/IASKSpecifier.m
View
@@ -32,7 +32,8 @@ - (id)initWithSpecifier:(NSDictionary*)specifier {
if ([super init]) {
[self setSpecifierDict:specifier];
- if ([[self type] isEqualToString:kIASKPSMultiValueSpecifier]) {
+ if ([[self type] isEqualToString:kIASKPSMultiValueSpecifier] ||
+ [[self type] isEqualToString:kIASKPSTitleValueSpecifier]) {
[self _reinterpretValues:[self specifierDict]];
}
}
@@ -42,7 +43,6 @@ - (id)initWithSpecifier:(NSDictionary*)specifier {
- (void)dealloc {
[_specifierDict release];
[_multipleValuesDict release];
- [_settingsReader release];
_settingsReader = nil;
[super dealloc];
@@ -54,8 +54,13 @@ - (void)_reinterpretValues:(NSDictionary*)specifierDict {
NSMutableDictionary *multipleValuesDict = [[[NSMutableDictionary alloc] init] autorelease];
- [multipleValuesDict setObject:values forKey:kIASKValues];
- [multipleValuesDict setObject:titles forKey:kIASKTitles];
+ if (values) {
+ [multipleValuesDict setObject:values forKey:kIASKValues];
+ }
+
+ if (titles) {
+ [multipleValuesDict setObject:titles forKey:kIASKTitles];
+ }
[self setMultipleValuesDict:multipleValuesDict];
}
@@ -73,12 +78,17 @@ - (NSString*)type {
}
- (NSString*)titleForCurrentValue:(id)currentValue {
- NSInteger keyIndex = [[_multipleValuesDict objectForKey:kIASKValues] indexOfObject:currentValue];
+ NSArray *values = [self multipleValues];
+ NSArray *titles = [self multipleTitles];
+ if (values.count != titles.count) {
+ return nil;
+ }
+ NSInteger keyIndex = [values indexOfObject:currentValue];
if (keyIndex == NSNotFound) {
return nil;
}
@try {
- return [self.settingsReader titleForStringId:[[_multipleValuesDict objectForKey:kIASKTitles] objectAtIndex:keyIndex]];
+ return [self.settingsReader titleForStringId:[titles objectAtIndex:keyIndex]];
}
@catch (NSException * e) {}
return nil;
@@ -183,13 +193,13 @@ - (UITextAutocapitalizationType)autocapitalizationType {
}
- (UITextAutocorrectionType)autoCorrectionType {
- if ([[_specifierDict objectForKey:kIASKAutoCorrectionType] isEqualToString:kIASKAutoCapNone]) {
+ if ([[_specifierDict objectForKey:kIASKAutoCorrectionType] isEqualToString:kIASKAutoCorrDefault]) {
return UITextAutocorrectionTypeDefault;
}
- else if ([[_specifierDict objectForKey:kIASKAutoCorrectionType] isEqualToString:kIASKAutoCapSentences]) {
+ else if ([[_specifierDict objectForKey:kIASKAutoCorrectionType] isEqualToString:kIASKAutoCorrNo]) {
return UITextAutocorrectionTypeNo;
}
- else if ([[_specifierDict objectForKey:kIASKAutoCorrectionType] isEqualToString:kIASKAutoCapWords]) {
+ else if ([[_specifierDict objectForKey:kIASKAutoCorrectionType] isEqualToString:kIASKAutoCorrYes]) {
return UITextAutocorrectionTypeYes;
}
return UITextAutocorrectionTypeDefault;
51 Externals/InAppSettingsKit/Views/IASKPSSliderSpecifierViewCell.m
View
@@ -2,7 +2,7 @@
// IASKPSSliderSpecifierViewCell.m
// http://www.inappsettingskit.com
//
-// Copyright (c) 2009:
+// Copyright (c) 2009-2010:
// Luc Vandal, Edovia Inc., http://www.edovia.com
// Ortwin Gentz, FutureTap GmbH, http://www.futuretap.com
// All rights reserved.
@@ -16,6 +16,7 @@
#import "IASKPSSliderSpecifierViewCell.h"
#import "IASKSlider.h"
+#import "IASKSettingsReader.h"
@implementation IASKPSSliderSpecifierViewCell
@@ -23,25 +24,43 @@ @implementation IASKPSSliderSpecifierViewCell
minImage=_minImage,
maxImage=_maxImage;
-- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
- if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
- // Initialization code
- }
- return self;
-}
-
-
-- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
-
- [super setSelected:selected animated:animated];
-
- // Configure the view for the selected state
-}
+- (void)layoutSubviews {
+ CGRect sliderFrame = _slider.frame;
+ sliderFrame.origin.x = kIASKSliderNoImagesX;
+ sliderFrame.size.width = kIASKSliderNoImagesWidth;
+ _minImage.hidden = YES;
+ _maxImage.hidden = YES;
+ // Check if there are min and max images. If so, change the layout accordingly.
+ if (_minImage.image && _maxImage.image) {
+ // Both images
+ _minImage.hidden = NO;
+ _maxImage.hidden = NO;
+ sliderFrame.origin.x = kIASKSliderBothImagesX;
+ sliderFrame.size.width = kIASKSliderBothImagesWidth;
+ }
+ else if (_minImage.image) {
+ // Min image
+ _minImage.hidden = NO;
+ sliderFrame.origin.x = kIASKSliderBothImagesX;
+ sliderFrame.size.width = kIASKSliderOneImageWidth;
+ }
+ else if (_maxImage.image) {
+ // Max image
+ _maxImage.hidden = NO;
+ sliderFrame.origin.x = kIASKSliderNoImagesX;
+ sliderFrame.size.width = kIASKSliderOneImageWidth;
+ }
+
+ _slider.frame = sliderFrame;
+}
- (void)dealloc {
[super dealloc];
}
-
+- (void)prepareForReuse {
+ _minImage.image = nil;
+ _maxImage.image = nil;
+}
@end
21 Externals/InAppSettingsKit/Views/IASKPSTextFieldSpecifierViewCell.m
View
@@ -2,7 +2,7 @@
// IASKPSTextFieldSpecifierViewCell.m
// http://www.inappsettingskit.com
//
-// Copyright (c) 2009:
+// Copyright (c) 2009-2010:
// Luc Vandal, Edovia Inc., http://www.edovia.com
// Ortwin Gentz, FutureTap GmbH, http://www.futuretap.com
// All rights reserved.
@@ -16,19 +16,24 @@
#import "IASKPSTextFieldSpecifierViewCell.h"
#import "IASKTextField.h"
+#import "IASKSettingsReader.h"
@implementation IASKPSTextFieldSpecifierViewCell
@synthesize label=_label,
textField=_textField;
-
-- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
- if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
- // Initialization code
- }
- return self;
-}
+- (void)layoutSubviews {
+ CGSize labelSize = [_label sizeThatFits:CGSizeZero];
+ labelSize.width = MIN(labelSize.width, _label.bounds.size.width);
+
+ CGRect textFieldFrame = _textField.frame;
+ textFieldFrame.origin.x = _label.frame.origin.x + MAX(kIASKMinLabelWidth, labelSize.width) + kIASKSpacing;
+ if (!_label.text.length)
+ textFieldFrame.origin.x = _label.frame.origin.x;
+ textFieldFrame.size.width = kIASKTableWidth - textFieldFrame.origin.x - _label.frame.origin.x;
+ _textField.frame = textFieldFrame;
+}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
22 Externals/InAppSettingsKit/Views/IASKPSTitleValueSpecifierViewCell.h
View
@@ -0,0 +1,22 @@
+//
+// IASKPSTitleValueSpecifierViewCell.h
+// http://www.inappsettingskit.com
+//
+// Copyright (c) 2010:
+// Luc Vandal, Edovia Inc., http://www.edovia.com
+// Ortwin Gentz, FutureTap GmbH, http://www.futuretap.com
+// All rights reserved.
+//
+// It is appreciated but not required that you give credit to Luc Vandal and Ortwin Gentz,
+// as the original authors of this code. You can give credit in a blog post, a tweet or on
+// a info page of your app. Also, the original authors appreciate letting them know if you use this code.
+//
+// This code is licensed under the BSD license that is available at: http://www.opensource.org/licenses/bsd-license.php
+//
+
+#import <UIKit/UIKit.h>
+
+
+@interface IASKPSTitleValueSpecifierViewCell : UITableViewCell
+
+@end
54 Externals/InAppSettingsKit/Views/IASKPSTitleValueSpecifierViewCell.m
View
@@ -0,0 +1,54 @@
+//
+// IASKPSTitleValueSpecifierViewCell.m
+// http://www.inappsettingskit.com
+//
+// Copyright (c) 2010:
+// Luc Vandal, Edovia Inc., http://www.edovia.com
+// Ortwin Gentz, FutureTap GmbH, http://www.futuretap.com
+// All rights reserved.
+//
+// It is appreciated but not required that you give credit to Luc Vandal and Ortwin Gentz,
+// as the original authors of this code. You can give credit in a blog post, a tweet or on
+// a info page of your app. Also, the original authors appreciate letting them know if you use this code.
+//
+// This code is licensed under the BSD license that is available at: http://www.opensource.org/licenses/bsd-license.php
+//
+
+#import "IASKPSTitleValueSpecifierViewCell.h"
+#import "IASKSettingsReader.h"
+
+
+@implementation IASKPSTitleValueSpecifierViewCell
+
+- (void)layoutSubviews {
+ // left align the value if the title is empty
+ if (!self.textLabel.text.length) {
+ self.textLabel.text = self.detailTextLabel.text;
+ self.detailTextLabel.text = nil;
+ if ([self.reuseIdentifier isEqualToString:kIASKPSMultiValueSpecifier]) {
+ self.textLabel.font = [UIFont systemFontOfSize:[UIFont labelFontSize]];
+ self.textLabel.textColor = self.detailTextLabel.textColor;
+ }
+ }
+ [super layoutSubviews];
+
+ CGSize viewSize = [self.textLabel superview].frame.size;
+
+ // set the left title label frame
+ CGFloat labelWidth = [self.textLabel sizeThatFits:CGSizeZero].width;
+ CGFloat minValueWidth = (self.detailTextLabel.text.length) ? kIASKMinValueWidth + kIASKSpacing : 0;
+ labelWidth = MIN(labelWidth, viewSize.width - minValueWidth - kIASKPaddingLeft -kIASKPaddingRight);
+ CGRect labelFrame = CGRectMake(kIASKPaddingLeft, 0, labelWidth, viewSize.height -2);
+ self.textLabel.frame = labelFrame;
+
+ // set the right value label frame
+ if (self.detailTextLabel.text.length) {
+ CGRect valueFrame = CGRectMake(kIASKPaddingLeft + labelWidth + kIASKSpacing,
+ 0,
+ viewSize.width - (kIASKPaddingLeft + labelWidth + kIASKSpacing) - kIASKPaddingRight,
+ viewSize.height -2);
+ self.detailTextLabel.frame = valueFrame;
+ }
+}
+
+@end
2  Externals/InAppSettingsKit/Views/IASKPSToggleSwitchSpecifierViewCell.m
View
@@ -23,7 +23,7 @@ @implementation IASKPSToggleSwitchSpecifierViewCell
toggle=_toggle;
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
- if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
+ if ((self = [super initWithStyle:style reuseIdentifier:reuseIdentifier])) {
// Initialization code
}
return self;
1  Externals/InAppSettingsKit/Views/IASKTextField.m
View
@@ -26,5 +26,4 @@ - (void)dealloc {
[super dealloc];
}
-
@end
73 Externals/InAppSettingsKit/Xibs/IASKAppSettingsView.xib
View
@@ -2,13 +2,13 @@
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
<data>
<int key="IBDocument.SystemTarget">768</int>
- <string key="IBDocument.SystemVersion">10B504</string>
- <string key="IBDocument.InterfaceBuilderVersion">732</string>
- <string key="IBDocument.AppKitVersion">1038.2</string>
- <string key="IBDocument.HIToolboxVersion">437.00</string>
+ <string key="IBDocument.SystemVersion">10F569</string>
+ <string key="IBDocument.InterfaceBuilderVersion">788</string>
+ <string key="IBDocument.AppKitVersion">1038.29</string>
+ <string key="IBDocument.HIToolboxVersion">461.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <string key="NS.object.0">62</string>
+ <string key="NS.object.0">117</string>
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -31,13 +31,15 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBProxyObject" id="372490531">
<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
<object class="IBProxyObject" id="975951072">
<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
<object class="IBUIView" id="191373211">
<reference key="NSNextResponder"/>
- <int key="NSvFlags">292</int>
+ <int key="NSvFlags">276</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBUITableView" id="1838945">
@@ -45,9 +47,42 @@
<int key="NSvFlags">274</int>
<string key="NSFrameSize">{320, 460}</string>
<reference key="NSSuperview" ref="191373211"/>
+ <object class="NSColor" key="IBUIBackgroundColor">
+ <int key="NSColorSpace">10</int>
+ <object class="NSImage" key="NSImage">
+ <int key="NSImageFlags">549453824</int>
+ <string key="NSSize">{84, 1}</string>
+ <object class="NSMutableArray" key="NSReps">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <integer value="0"/>
+ <object class="NSBitmapImageRep">
+ <object class="NSData" key="NSTIFFRepresentation">
+ <bytes key="NS.bytes">TU0AKgAAAVjFzNT/xczU/8XM1P/FzNT/xczS/8vS2P/L0tj/xczU/8XM1P/FzNT/xczU/8XM0v/L0tj/
+y9LY/8XM1P/FzNT/xczU/8XM1P/FzNL/y9LY/8vS2P/FzNT/xczU/8XM1P/FzNT/xczS/8vS2P/L0tj/
+xczU/8XM1P/FzNT/xczU/8XM0v/L0tj/y9LY/8XM1P/FzNT/xczU/8XM1P/FzNL/y9LY/8vS2P/FzNT/
+xczU/8XM1P/FzNT/xczS/8vS2P/L0tj/xczU/8XM1P/FzNT/xczU/8XM0v/L0tj/y9LY/8XM1P/FzNT/
+xczU/8XM1P/FzNL/y9LY/8vS2P/FzNT/xczU/8XM1P/FzNT/xczS/8vS2P/L0tj/xczU/8XM1P/FzNT/
+xczU/8XM0v/L0tj/y9LY/8XM1P/FzNT/xczU/8XM1P/FzNL/y9LY/8vS2P8ADQEAAAMAAAABAFQAAAEB
+AAMAAAABAAEAAAECAAMAAAAEAAAB+gEDAAMAAAABAAEAAAEGAAMAAAABAAIAAAERAAQAAAABAAAACAES
+AAMAAAABAAEAAAEVAAMAAAABAAQAAAEWAAMAAAABAAEAAAEXAAQAAAABAAABUAEcAAMAAAABAAEAAAFS
+AAMAAAABAAEAAAFTAAMAAAAEAAACAgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
+ </object>
+ </object>
+ </object>
+ </object>
+ <object class="NSColor" key="NSColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MCAwAA</bytes>
+ </object>
+ </object>
+ <string key="IBUIColorCocoaTouchKeyPath">groupTableViewBackgroundColor</string>
+ </object>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<bool key="IBUIBouncesZoom">NO</bool>
<int key="IBUIStyle">1</int>
<int key="IBUISeparatorStyle">1</int>
@@ -64,6 +99,7 @@
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MQA</bytes>
</object>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
</object>
<object class="IBObjectContainer" key="IBDocument.Objects">
@@ -181,13 +217,31 @@
<object class="IBPartialClassDescription">
<string key="className">IASKAppSettingsViewController</string>
<string key="superclassName">UIViewController</string>
+ <object class="NSMutableDictionary" key="actions">
+ <string key="NS.key.0">dismiss:</string>
+ <string key="NS.object.0">id</string>
+ </object>
+ <object class="NSMutableDictionary" key="actionInfosByName">
+ <string key="NS.key.0">dismiss:</string>
+ <object class="IBActionInfo" key="NS.object.0">
+ <string key="name">dismiss:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ </object>
<object class="NSMutableDictionary" key="outlets">
<string key="NS.key.0">_tableView</string>
<string key="NS.object.0">UITableView</string>
</object>
+ <object class="NSMutableDictionary" key="toOneOutletInfosByName">
+ <string key="NS.key.0">_tableView</string>
+ <object class="IBToOneOutletInfo" key="NS.object.0">
+ <string key="name">_tableView</string>
+ <string key="candidateClassName">UITableView</string>
+ </object>
+ </object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
- <string key="minorKey">IASKAppSettingsViewController.h</string>
+ <string key="minorKey">../InAppSettingsKit/Controllers/IASKAppSettingsViewController.h</string>
</object>
</object>
</object>
@@ -389,6 +443,7 @@
</object>
</object>
<int key="IBDocument.localizationMode">0</int>
+ <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
<integer value="768" key="NS.object.0"/>
@@ -398,8 +453,8 @@
<integer value="3000" key="NS.object.0"/>
</object>
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
- <string key="IBDocument.LastKnownRelativeProjectPath">TouchPad.xcodeproj</string>
+ <string key="IBDocument.LastKnownRelativeProjectPath">../InAppSettingsKitSampleApp.xcodeproj</string>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
- <string key="IBCocoaTouchPluginVersion">3.1</string>
+ <string key="IBCocoaTouchPluginVersion">117</string>
</data>
</archive>
13 Externals/InAppSettingsKit/Xibs/IASKPSSliderSpecifierViewCell.xib
View
@@ -37,7 +37,7 @@
</object>
<object class="IBUITableViewCell" id="699910302">
<reference key="NSNextResponder"/>
- <int key="NSvFlags">292</int>
+ <int key="NSvFlags">290</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBUIView" id="833157797">
@@ -47,8 +47,8 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBUISlider" id="213296969">
<reference key="NSNextResponder" ref="833157797"/>
- <int key="NSvFlags">292</int>
- <string key="NSFrame">{{45, 11}, {210, 23}}</string>
+ <int key="NSvFlags">290</int>
+ <string key="NSFrame">{{52, 12}, {216, 23}}</string>
<reference key="NSSuperview" ref="833157797"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
@@ -59,8 +59,8 @@
</object>
<object class="IBUIImageView" id="343121076">
<reference key="NSNextResponder" ref="833157797"/>
- <int key="NSvFlags">292</int>
- <string key="NSFrame">{{268, 11}, {21, 21}}</string>
+ <int key="NSvFlags">289</int>
+ <string key="NSFrame">{{278, 13}, {21, 21}}</string>
<reference key="NSSuperview" ref="833157797"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
@@ -70,7 +70,7 @@
<object class="IBUIImageView" id="408162837">
<reference key="NSNextResponder" ref="833157797"/>
<int key="NSvFlags">292</int>
- <string key="NSFrame">{{11, 11}, {21, 21}}</string>
+ <string key="NSFrame">{{21, 13}, {21, 21}}</string>
<reference key="NSSuperview" ref="833157797"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
@@ -96,6 +96,7 @@
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MSAxIDEAA</bytes>
</object>
+ <bool key="IBUIClipsSubviews">YES</bool>
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
<int key="IBUISeparatorStyle">1</int>
<reference key="IBUIContentView" ref="833157797"/>
62 Externals/InAppSettingsKit/Xibs/IASKPSTextFieldSpecifierViewCell.xib
View
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
<data>
- <int key="IBDocument.SystemTarget">768</int>
- <string key="IBDocument.SystemVersion">10C540</string>
- <string key="IBDocument.InterfaceBuilderVersion">740</string>
- <string key="IBDocument.AppKitVersion">1038.25</string>
- <string key="IBDocument.HIToolboxVersion">458.00</string>
+ <int key="IBDocument.SystemTarget">1024</int>
+ <string key="IBDocument.SystemVersion">10F569</string>
+ <string key="IBDocument.InterfaceBuilderVersion">788</string>
+ <string key="IBDocument.AppKitVersion">1038.29</string>
+ <string key="IBDocument.HIToolboxVersion">461.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <string key="NS.object.0">62</string>
+ <string key="NS.object.0">117</string>
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -31,13 +31,15 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBProxyObject" id="841351856">
<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
<object class="IBProxyObject" id="371349661">
<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
<object class="IBUITableViewCell" id="639928991">
<reference key="NSNextResponder"/>
- <int key="NSvFlags">292</int>
+ <int key="NSvFlags">290</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBUIView" id="642554623">
@@ -47,12 +49,13 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBUILabel" id="68117349">
<reference key="NSNextResponder" ref="642554623"/>
- <int key="NSvFlags">292</int>
- <string key="NSFrame">{{10, 10}, {106, 21}}</string>
+ <int key="NSvFlags">294</int>
+ <string key="NSFrame">{{19, 11}, {240, 21}}</string>
<reference key="NSSuperview" ref="642554623"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<bool key="IBUIUserInteractionEnabled">NO</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<string key="IBUIText">Label</string>
<object class="NSFont" key="IBUIFont">
<string key="NSName">Helvetica-Bold</string>
@@ -69,12 +72,12 @@
</object>
<object class="IBUITextField" id="239084550">
<reference key="NSNextResponder" ref="642554623"/>
- <int key="NSvFlags">292</int>
- <string key="NSFrame">{{124, 5}, {166, 31}}</string>
+ <int key="NSvFlags">291</int>
+ <string key="NSFrame">{{100, 11}, {201, 21}}</string>
<reference key="NSSuperview" ref="642554623"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
- <int key="IBUIContentVerticalAlignment">0</int>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<string key="IBUIText">hello</string>
<object class="NSColor" key="IBUITextColor">
<int key="NSColorSpace">1</int>
@@ -88,10 +91,12 @@
<int key="IBUITextAlignment">2</int>
<bool key="IBUIAdjustsFontSizeToFit">YES</bool>
<float key="IBUIMinimumFontSize">10</float>
- <object class="IBUITextInputTraits" key="IBUITextInputTraits"/>
+ <object class="IBUITextInputTraits" key="IBUITextInputTraits">
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
</object>
</object>
- <string key="NSFrameSize">{320, 43}</string>
+ <string key="NSFrameSize">{320, 44}</string>
<reference key="NSSuperview" ref="639928991"/>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">3</int>
@@ -101,6 +106,7 @@
<bool key="IBUIClipsSubviews">YES</bool>
<int key="IBUIContentMode">4</int>
<bool key="IBUIMultipleTouchEnabled">YES</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
</object>
<string key="NSFrameSize">{320, 44}</string>
@@ -109,7 +115,9 @@
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MSAxIDEAA</bytes>
</object>
+ <bool key="IBUIClipsSubviews">YES</bool>
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<int key="IBUISeparatorStyle">1</int>
<int key="IBUISelectionStyle">0</int>
<reference key="IBUIContentView" ref="642554623"/>
@@ -194,7 +202,7 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<string>UIResponder</string>
<string>IASKPSTextFieldSpecifierViewCell</string>
- <string>{{133, 524}, {320, 44}}</string>
+ <string>{{105, 513}, {320, 44}}</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>IASKTextField</string>
@@ -238,6 +246,25 @@
<string>IASKTextField</string>
</object>
</object>
+ <object class="NSMutableDictionary" key="toOneOutletInfosByName">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>_label</string>
+ <string>_textField</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBToOneOutletInfo">
+ <string key="name">_label</string>
+ <string key="candidateClassName">UILabel</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">_textField</string>
+ <string key="candidateClassName">IASKTextField</string>
+ </object>
+ </object>
+ </object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">../InAppSettingsKit/Views/IASKPSTextFieldSpecifierViewCell.h</string>
@@ -425,9 +452,10 @@
</object>
</object>
<int key="IBDocument.localizationMode">0</int>
+ <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
- <integer value="768" key="NS.object.0"/>
+ <integer value="1024" key="NS.object.0"/>
</object>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
@@ -436,6 +464,6 @@
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
<string key="IBDocument.LastKnownRelativeProjectPath">../InAppSettingsKitSampleApp.xcodeproj</string>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
- <string key="IBCocoaTouchPluginVersion">3.1</string>
+ <string key="IBCocoaTouchPluginVersion">117</string>
</data>
</archive>
11 Externals/InAppSettingsKit/Xibs/IASKPSToggleSwitchSpecifierViewCell.xib
View
@@ -37,7 +37,7 @@
</object>
<object class="IBUITableViewCell" id="507262743">
<reference key="NSNextResponder"/>
- <int key="NSvFlags">292</int>
+ <int key="NSvFlags">290</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBUIView" id="659685403">
@@ -47,8 +47,8 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBUILabel" id="697203718">
<reference key="NSNextResponder" ref="659685403"/>
- <int key="NSvFlags">292</int>
- <string key="NSFrame">{{10, 10}, {182, 21}}</string>
+ <int key="NSvFlags">294</int>
+ <string key="NSFrame">{{9, 10}, {200, 21}}</string>
<reference key="NSSuperview" ref="659685403"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
@@ -69,8 +69,8 @@
</object>
<object class="IBUISwitch" id="297989004">
<reference key="NSNextResponder" ref="659685403"/>
- <int key="NSvFlags">292</int>
- <string key="NSFrame">{{198, 8}, {94, 27}}</string>
+ <int key="NSvFlags">289</int>
+ <string key="NSFrame">{{218, 8}, {94, 27}}</string>
<reference key="NSSuperview" ref="659685403"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
@@ -98,6 +98,7 @@
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MSAxIDEAA</bytes>
</object>
+ <bool key="IBUIClipsSubviews">YES</bool>
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
<int key="IBUISeparatorStyle">1</int>
<int key="IBUISelectionStyle">0</int>
Please sign in to comment.
Something went wrong with that request. Please try again.