Skip to content
This repository has been archived by the owner on Nov 27, 2017. It is now read-only.

Commit

Permalink
Allow loading IASKAppSettingsViewController from NIB;
Browse files Browse the repository at this point in the history
Sample App demoes Settings in a TabBarController
  • Loading branch information
Ortwin Gentz committed Mar 11, 2010
1 parent 7fb44fa commit 8a81bca
Show file tree
Hide file tree
Showing 9 changed files with 610 additions and 281 deletions.
10 changes: 10 additions & 0 deletions InAppSettingsKit/Controllers/IASKAppSettingsViewController.m
Expand Up @@ -88,6 +88,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];

Expand Down
Expand Up @@ -29,7 +29,6 @@ @implementation InAppSettingsKitSampleAppAppDelegate

- (void)applicationDidFinishLaunching:(UIApplication *)application {
NSLog(@"App Started");
// [window addSubview:navigationController.view]; // Uncomment this line and comment the next one to see *only* a navigationcontroller
[window addSubview:tabBarController.view];
}

Expand Down
20 changes: 20 additions & 0 deletions InAppSettingsKitSampleApp/English.lproj/Localizable.strings
@@ -0,0 +1,20 @@
//
// Localizable.strings
// InAppSettingsKitSampleApp
//
// InAppSettingsKitSampleApp
// http://www.inappsettingskit.com
//
// Copyright (c) 2009-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
//

"Settings" = "Settings";
180 changes: 117 additions & 63 deletions InAppSettingsKitSampleApp/English.lproj/MainWindow.xib
Expand Up @@ -12,9 +12,9 @@
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
<integer value="56"/>
<integer value="2"/>
<integer value="29"/>
<integer value="53"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
Expand Down Expand Up @@ -56,52 +56,65 @@
<object class="IBUITabBarController" id="990288543">
<object class="IBUISimulatedTabBarMetrics" key="IBUISimulatedBottomBarMetrics"/>
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
<object class="IBUINavigationController" key="IBUISelectedViewController" id="979198075">
<object class="IBUITabBarItem" key="IBUITabBarItem" id="399555020">
<object class="IBUINavigationController" key="IBUISelectedViewController" id="702211332">
<object class="IBUITabBarItem" key="IBUITabBarItem" id="672385490">
<string key="IBUITitle">Settings</string>
<object class="NSCustomResource" key="IBUIImage">
<string key="NSClassName">NSImage</string>
<string key="NSResourceName">20-gear2.png</string>
</object>
<reference key="IBUITabBar"/>
</object>
<reference key="IBUIToolbarItems" ref="0"/>
<reference key="IBUIParentViewController" ref="990288543"/>
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
<object class="IBUINavigationBar" key="IBUINavigationBar" id="187738965">
<object class="IBUINavigationBar" key="IBUINavigationBar" id="35091148">
<nil key="NSNextResponder"/>
<int key="NSvFlags">294</int>
<string key="NSFrameSize">{0, 0}</string>
<int key="NSvFlags">256</int>
<string key="NSFrameSize">{320, 44}</string>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<bool key="IBUIMultipleTouchEnabled">YES</bool>
</object>
<object class="NSMutableArray" key="IBUIViewControllers">
<object class="NSArray" key="IBUIViewControllers">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBUIViewController" id="416559771">
<object class="IBUINavigationItem" key="IBUINavigationItem" id="224615630">
<object class="IBUIViewController" id="617906475">
<reference key="IBUIToolbarItems" ref="0"/>
<object class="IBUINavigationItem" key="IBUINavigationItem" id="757351396">
<reference key="IBUINavigationBar"/>
<string key="IBUITitle">InAppSettingKit Demo</string>
<string key="IBUITitle">Settings</string>
</object>
<reference key="IBUIParentViewController" ref="979198075"/>
<reference key="IBUIParentViewController" ref="702211332"/>
</object>
</object>
</object>
<object class="NSMutableArray" key="IBUIViewControllers">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="979198075"/>
<object class="IBUIViewController" id="582693551">
<object class="IBUITabBarItem" key="IBUITabBarItem" id="283643571">
<string key="IBUITitle">Item 1</string>
<object class="IBUINavigationController" id="979198075">
<string key="IBUITitle">Home</string>
<object class="IBUITabBarItem" key="IBUITabBarItem" id="399555020">
<reference key="IBUITabBar"/>
<int key="IBUISystemItemIdentifier">2</int>
</object>
<reference key="IBUIParentViewController" ref="990288543"/>
</object>
<object class="IBUIViewController" id="458711475">
<object class="IBUITabBarItem" key="IBUITabBarItem" id="22723144">
<string key="IBUITitle">Item 2</string>
<reference key="IBUITabBar"/>
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
<object class="IBUINavigationBar" key="IBUINavigationBar" id="187738965">
<nil key="NSNextResponder"/>
<int key="NSvFlags">294</int>
<string key="NSFrameSize">{0, 0}</string>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
</object>
<object class="NSMutableArray" key="IBUIViewControllers">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBUIViewController" id="416559771">
<object class="IBUINavigationItem" key="IBUINavigationItem" id="224615630">
<string key="IBUITitle">InAppSettingKit Demo</string>
</object>
<reference key="IBUIParentViewController" ref="979198075"/>
</object>
</object>
<reference key="IBUIParentViewController" ref="990288543"/>
</object>
<reference ref="702211332"/>
</object>
<object class="IBUITabBar" key="IBUITabBar" id="1010152808">
<nil key="NSNextResponder"/>
Expand Down Expand Up @@ -313,9 +326,8 @@
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="1010152808"/>
<reference ref="582693551"/>
<reference ref="458711475"/>
<reference ref="979198075"/>
<reference ref="702211332"/>
</object>
<reference key="parent" ref="0"/>
</object>
Expand All @@ -324,34 +336,6 @@
<reference key="object" ref="1010152808"/>
<reference key="parent" ref="990288543"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">49</int>
<reference key="object" ref="582693551"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="283643571"/>
</object>
<reference key="parent" ref="990288543"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">50</int>
<reference key="object" ref="458711475"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="22723144"/>
</object>
<reference key="parent" ref="990288543"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">51</int>
<reference key="object" ref="22723144"/>
<reference key="parent" ref="458711475"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">52</int>
<reference key="object" ref="283643571"/>
<reference key="parent" ref="582693551"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">22</int>
<reference key="object" ref="979198075"/>
Expand Down Expand Up @@ -387,6 +371,41 @@
<reference key="object" ref="399555020"/>
<reference key="parent" ref="979198075"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">56</int>
<reference key="object" ref="702211332"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="672385490"/>
<reference ref="617906475"/>
<reference ref="35091148"/>
</object>
<reference key="parent" ref="990288543"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">57</int>
<reference key="object" ref="672385490"/>
<reference key="parent" ref="702211332"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">58</int>
<reference key="object" ref="617906475"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="757351396"/>
</object>
<reference key="parent" ref="702211332"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">59</int>
<reference key="object" ref="757351396"/>
<reference key="parent" ref="617906475"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">60</int>
<reference key="object" ref="35091148"/>
<reference key="parent" ref="702211332"/>
</object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
Expand All @@ -413,10 +432,7 @@
<string>47.IBEditorWindowLastContentRect</string>
<string>47.IBPluginDependency</string>
<string>48.IBPluginDependency</string>
<string>49.IBPluginDependency</string>
<string>50.IBPluginDependency</string>
<string>51.IBPluginDependency</string>
<string>52.IBPluginDependency</string>
<string>58.CustomClassName</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
Expand All @@ -429,7 +445,7 @@
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
</object>
<string>{{784, 1203}, {320, 480}}</string>
<string>{{784, 1076}, {320, 480}}</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>{{685, 676}, {320, 480}}</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
Expand All @@ -443,13 +459,10 @@
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>{{42, 608}, {320, 480}}</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>{{48, 608}, {320, 480}}</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>IASKAppSettingsViewController</string>
</object>
</object>
<object class="NSMutableDictionary" key="unlocalizedProperties">
Expand All @@ -468,11 +481,36 @@
</object>
</object>
<nil key="sourceID"/>
<int key="maxID">55</int>
<int key="maxID">60</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
<bool key="EncodedWithXMLCoder">YES</bool>
<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="outlets">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>_tableView</string>
<string>currentFirstResponder</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>UITableView</string>
<string>id</string>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">../InAppSettingsKit/Controllers/IASKAppSettingsViewController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">InAppSettingsKitSampleAppAppDelegate</string>
<string key="superclassName">NSObject</string>
Expand Down Expand Up @@ -705,6 +743,14 @@
<string key="superclassName">NSObject</string>
<reference key="sourceIdentifier" ref="925318576"/>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIScrollView</string>
<string key="superclassName">UIView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIScrollView.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UISearchBar</string>
<string key="superclassName">UIView</string>
Expand Down Expand Up @@ -745,6 +791,14 @@
<string key="minorKey">UIKit.framework/Headers/UITabBarItem.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UITableView</string>
<string key="superclassName">UIScrollView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UITableView.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
Expand Down
20 changes: 20 additions & 0 deletions InAppSettingsKitSampleApp/French.lproj/Localizable.strings
@@ -0,0 +1,20 @@
//
// Localizable.strings
// InAppSettingsKitSampleApp
//
// InAppSettingsKitSampleApp
// http://www.inappsettingskit.com
//
// Copyright (c) 2009-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
//

"Settings" = "Paramètres";

0 comments on commit 8a81bca

Please sign in to comment.