Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #1 from aaronbrethorst/master

Example and -initWithCoder:
  • Loading branch information...
commit 53ba67831bb42302f474a405a64db03fbb65ccdd 2 parents 3cf09b8 + 8f07f11
@soffes authored
View
5 .gitignore
@@ -0,0 +1,5 @@
+*~.nib/
+*.pbxuser
+.xcuserdatad
+xcuserdata/
+.DS_Store
View
286 Example/Example.xcodeproj/project.pbxproj
@@ -0,0 +1,286 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 46;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 93DD5097148BFD370021E244 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 93DD5096148BFD370021E244 /* UIKit.framework */; };
+ 93DD5099148BFD370021E244 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 93DD5098148BFD370021E244 /* Foundation.framework */; };
+ 93DD509B148BFD370021E244 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 93DD509A148BFD370021E244 /* CoreGraphics.framework */; };
+ 93DD50A1148BFD370021E244 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 93DD509F148BFD370021E244 /* InfoPlist.strings */; };
+ 93DD50A3148BFD370021E244 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 93DD50A2148BFD370021E244 /* main.m */; };
+ 93DD50A7148BFD370021E244 /* SSAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 93DD50A6148BFD370021E244 /* SSAppDelegate.m */; };
+ 93DD50AA148BFD370021E244 /* SSViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 93DD50A9148BFD370021E244 /* SSViewController.m */; };
+ 93DD50AD148BFD370021E244 /* SSViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 93DD50AB148BFD370021E244 /* SSViewController.xib */; };
+ 93DD50B5148BFD400021E244 /* SSIndicatorLabel.m in Sources */ = {isa = PBXBuildFile; fileRef = 93DD50B4148BFD400021E244 /* SSIndicatorLabel.m */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+ 93DD5092148BFD370021E244 /* Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ 93DD5096148BFD370021E244 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
+ 93DD5098148BFD370021E244 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+ 93DD509A148BFD370021E244 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
+ 93DD509E148BFD370021E244 /* Example-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Example-Info.plist"; sourceTree = "<group>"; };
+ 93DD50A0148BFD370021E244 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+ 93DD50A2148BFD370021E244 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
+ 93DD50A4148BFD370021E244 /* Example-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Example-Prefix.pch"; sourceTree = "<group>"; };
+ 93DD50A5148BFD370021E244 /* SSAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SSAppDelegate.h; sourceTree = "<group>"; };
+ 93DD50A6148BFD370021E244 /* SSAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SSAppDelegate.m; sourceTree = "<group>"; };
+ 93DD50A8148BFD370021E244 /* SSViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SSViewController.h; sourceTree = "<group>"; };
+ 93DD50A9148BFD370021E244 /* SSViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SSViewController.m; sourceTree = "<group>"; };
+ 93DD50AC148BFD370021E244 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/SSViewController.xib; sourceTree = "<group>"; };
+ 93DD50B3148BFD400021E244 /* SSIndicatorLabel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SSIndicatorLabel.h; path = ../SSIndicatorLabel.h; sourceTree = "<group>"; };
+ 93DD50B4148BFD400021E244 /* SSIndicatorLabel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SSIndicatorLabel.m; path = ../SSIndicatorLabel.m; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 93DD508F148BFD370021E244 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 93DD5097148BFD370021E244 /* UIKit.framework in Frameworks */,
+ 93DD5099148BFD370021E244 /* Foundation.framework in Frameworks */,
+ 93DD509B148BFD370021E244 /* CoreGraphics.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 93DD5087148BFD370021E244 = {
+ isa = PBXGroup;
+ children = (
+ 93DD50B3148BFD400021E244 /* SSIndicatorLabel.h */,
+ 93DD50B4148BFD400021E244 /* SSIndicatorLabel.m */,
+ 93DD509C148BFD370021E244 /* Example */,
+ 93DD5095148BFD370021E244 /* Frameworks */,
+ 93DD5093148BFD370021E244 /* Products */,
+ );
+ sourceTree = "<group>";
+ };
+ 93DD5093148BFD370021E244 /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 93DD5092148BFD370021E244 /* Example.app */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ 93DD5095148BFD370021E244 /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 93DD5096148BFD370021E244 /* UIKit.framework */,
+ 93DD5098148BFD370021E244 /* Foundation.framework */,
+ 93DD509A148BFD370021E244 /* CoreGraphics.framework */,
+ );
+ name = Frameworks;
+ sourceTree = "<group>";
+ };
+ 93DD509C148BFD370021E244 /* Example */ = {
+ isa = PBXGroup;
+ children = (
+ 93DD50A5148BFD370021E244 /* SSAppDelegate.h */,
+ 93DD50A6148BFD370021E244 /* SSAppDelegate.m */,
+ 93DD50A8148BFD370021E244 /* SSViewController.h */,
+ 93DD50A9148BFD370021E244 /* SSViewController.m */,
+ 93DD50AB148BFD370021E244 /* SSViewController.xib */,
+ 93DD509D148BFD370021E244 /* Supporting Files */,
+ );
+ path = Example;
+ sourceTree = "<group>";
+ };
+ 93DD509D148BFD370021E244 /* Supporting Files */ = {
+ isa = PBXGroup;
+ children = (
+ 93DD509E148BFD370021E244 /* Example-Info.plist */,
+ 93DD509F148BFD370021E244 /* InfoPlist.strings */,
+ 93DD50A2148BFD370021E244 /* main.m */,
+ 93DD50A4148BFD370021E244 /* Example-Prefix.pch */,
+ );
+ name = "Supporting Files";
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ 93DD5091148BFD370021E244 /* Example */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 93DD50B0148BFD370021E244 /* Build configuration list for PBXNativeTarget "Example" */;
+ buildPhases = (
+ 93DD508E148BFD370021E244 /* Sources */,
+ 93DD508F148BFD370021E244 /* Frameworks */,
+ 93DD5090148BFD370021E244 /* Resources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = Example;
+ productName = Example;
+ productReference = 93DD5092148BFD370021E244 /* Example.app */;
+ productType = "com.apple.product-type.application";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 93DD5089148BFD370021E244 /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ LastUpgradeCheck = 0420;
+ ORGANIZATIONNAME = "Structlab LLC";
+ };
+ buildConfigurationList = 93DD508C148BFD370021E244 /* Build configuration list for PBXProject "Example" */;
+ compatibilityVersion = "Xcode 3.2";
+ developmentRegion = English;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ );
+ mainGroup = 93DD5087148BFD370021E244;
+ productRefGroup = 93DD5093148BFD370021E244 /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 93DD5091148BFD370021E244 /* Example */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 93DD5090148BFD370021E244 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 93DD50A1148BFD370021E244 /* InfoPlist.strings in Resources */,
+ 93DD50AD148BFD370021E244 /* SSViewController.xib in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 93DD508E148BFD370021E244 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 93DD50A3148BFD370021E244 /* main.m in Sources */,
+ 93DD50A7148BFD370021E244 /* SSAppDelegate.m in Sources */,
+ 93DD50AA148BFD370021E244 /* SSViewController.m in Sources */,
+ 93DD50B5148BFD400021E244 /* SSIndicatorLabel.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXVariantGroup section */
+ 93DD509F148BFD370021E244 /* InfoPlist.strings */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 93DD50A0148BFD370021E244 /* en */,
+ );
+ name = InfoPlist.strings;
+ sourceTree = "<group>";
+ };
+ 93DD50AB148BFD370021E244 /* SSViewController.xib */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 93DD50AC148BFD370021E244 /* en */,
+ );
+ name = SSViewController.xib;
+ sourceTree = "<group>";
+ };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ 93DD50AE148BFD370021E244 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+ GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+ GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 5.0;
+ SDKROOT = iphoneos;
+ };
+ name = Debug;
+ };
+ 93DD50AF148BFD370021E244 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+ GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 5.0;
+ OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
+ SDKROOT = iphoneos;
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Release;
+ };
+ 93DD50B1148BFD370021E244 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "Example/Example-Prefix.pch";
+ INFOPLIST_FILE = "Example/Example-Info.plist";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ WRAPPER_EXTENSION = app;
+ };
+ name = Debug;
+ };
+ 93DD50B2148BFD370021E244 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "Example/Example-Prefix.pch";
+ INFOPLIST_FILE = "Example/Example-Info.plist";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ WRAPPER_EXTENSION = app;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 93DD508C148BFD370021E244 /* Build configuration list for PBXProject "Example" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 93DD50AE148BFD370021E244 /* Debug */,
+ 93DD50AF148BFD370021E244 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 93DD50B0148BFD370021E244 /* Build configuration list for PBXNativeTarget "Example" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 93DD50B1148BFD370021E244 /* Debug */,
+ 93DD50B2148BFD370021E244 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 93DD5089148BFD370021E244 /* Project object */;
+}
View
7 Example/Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+ version = "1.0">
+ <FileRef
+ location = "self:Example.xcodeproj">
+ </FileRef>
+</Workspace>
View
84 Example/Example.xcodeproj/xcuserdata/aaron.xcuserdatad/xcschemes/Example.xcscheme
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+ version = "1.3">
+ <BuildAction
+ parallelizeBuildables = "YES"
+ buildImplicitDependencies = "YES">
+ <BuildActionEntries>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "93DD5091148BFD370021E244"
+ BuildableName = "Example.app"
+ BlueprintName = "Example"
+ ReferencedContainer = "container:Example.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ </BuildActionEntries>
+ </BuildAction>
+ <TestAction
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.GDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.GDB"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ buildConfiguration = "Debug">
+ <Testables>
+ </Testables>
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "93DD5091148BFD370021E244"
+ BuildableName = "Example.app"
+ BlueprintName = "Example"
+ ReferencedContainer = "container:Example.xcodeproj">
+ </BuildableReference>
+ </MacroExpansion>
+ </TestAction>
+ <LaunchAction
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.GDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.GDB"
+ launchStyle = "0"
+ useCustomWorkingDirectory = "NO"
+ buildConfiguration = "Debug"
+ debugDocumentVersioning = "YES"
+ allowLocationSimulation = "YES">
+ <BuildableProductRunnable>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "93DD5091148BFD370021E244"
+ BuildableName = "Example.app"
+ BlueprintName = "Example"
+ ReferencedContainer = "container:Example.xcodeproj">
+ </BuildableReference>
+ </BuildableProductRunnable>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </LaunchAction>
+ <ProfileAction
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ savedToolIdentifier = ""
+ useCustomWorkingDirectory = "NO"
+ buildConfiguration = "Release"
+ debugDocumentVersioning = "YES">
+ <BuildableProductRunnable>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "93DD5091148BFD370021E244"
+ BuildableName = "Example.app"
+ BlueprintName = "Example"
+ ReferencedContainer = "container:Example.xcodeproj">
+ </BuildableReference>
+ </BuildableProductRunnable>
+ </ProfileAction>
+ <AnalyzeAction
+ buildConfiguration = "Debug">
+ </AnalyzeAction>
+ <ArchiveAction
+ buildConfiguration = "Release"
+ revealArchiveInOrganizer = "YES">
+ </ArchiveAction>
+</Scheme>
View
22 Example/Example.xcodeproj/xcuserdata/aaron.xcuserdatad/xcschemes/xcschememanagement.plist
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>SchemeUserState</key>
+ <dict>
+ <key>Example.xcscheme</key>
+ <dict>
+ <key>orderHint</key>
+ <integer>0</integer>
+ </dict>
+ </dict>
+ <key>SuppressBuildableAutocreation</key>
+ <dict>
+ <key>93DD5091148BFD370021E244</key>
+ <dict>
+ <key>primary</key>
+ <true/>
+ </dict>
+ </dict>
+</dict>
+</plist>
View
40 Example/Example/Example-Info.plist
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>en</string>
+ <key>CFBundleDisplayName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIconFiles</key>
+ <array/>
+ <key>CFBundleIdentifier</key>
+ <string>es.samsoff.${PRODUCT_NAME:rfc1034identifier}</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1.0</string>
+ <key>LSRequiresIPhoneOS</key>
+ <true/>
+ <key>UIRequiredDeviceCapabilities</key>
+ <array>
+ <string>armv7</string>
+ </array>
+ <key>UISupportedInterfaceOrientations</key>
+ <array>
+ <string>UIInterfaceOrientationPortrait</string>
+ <string>UIInterfaceOrientationLandscapeLeft</string>
+ <string>UIInterfaceOrientationLandscapeRight</string>
+ </array>
+</dict>
+</plist>
View
14 Example/Example/Example-Prefix.pch
@@ -0,0 +1,14 @@
+//
+// Prefix header for all source files of the 'Example' target in the 'Example' project
+//
+
+#import <Availability.h>
+
+#ifndef __IPHONE_4_0
+#warning "This project uses features only available in iOS SDK 4.0 and later."
+#endif
+
+#ifdef __OBJC__
+ #import <UIKit/UIKit.h>
+ #import <Foundation/Foundation.h>
+#endif
View
19 Example/Example/SSAppDelegate.h
@@ -0,0 +1,19 @@
+//
+// SSAppDelegate.h
+// Example
+//
+// Created by Aaron Brethorst on 12/4/11.
+// Copyright (c) 2011 Structlab LLC. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@class SSViewController;
+
+@interface SSAppDelegate : UIResponder <UIApplicationDelegate>
+
+@property (strong, nonatomic) UIWindow *window;
+
+@property (strong, nonatomic) SSViewController *viewController;
+
+@end
View
74 Example/Example/SSAppDelegate.m
@@ -0,0 +1,74 @@
+//
+// SSAppDelegate.m
+// Example
+//
+// Created by Aaron Brethorst on 12/4/11.
+// Copyright (c) 2011 Structlab LLC. All rights reserved.
+//
+
+#import "SSAppDelegate.h"
+
+#import "SSViewController.h"
+
+@implementation SSAppDelegate
+
+@synthesize window = _window;
+@synthesize viewController = _viewController;
+
+- (void)dealloc
+{
+ [_window release];
+ [_viewController release];
+ [super dealloc];
+}
+
+- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
+{
+ self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
+ // Override point for customization after application launch.
+ self.viewController = [[[SSViewController alloc] initWithNibName:@"SSViewController" bundle:nil] autorelease];
+ self.window.rootViewController = self.viewController;
+ [self.window makeKeyAndVisible];
+ return YES;
+}
+
+- (void)applicationWillResignActive:(UIApplication *)application
+{
+ /*
+ Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
+ Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
+ */
+}
+
+- (void)applicationDidEnterBackground:(UIApplication *)application
+{
+ /*
+ Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
+ If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
+ */
+}
+
+- (void)applicationWillEnterForeground:(UIApplication *)application
+{
+ /*
+ Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
+ */
+}
+
+- (void)applicationDidBecomeActive:(UIApplication *)application
+{
+ /*
+ Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
+ */
+}
+
+- (void)applicationWillTerminate:(UIApplication *)application
+{
+ /*
+ Called when the application is about to terminate.
+ Save data if appropriate.
+ See also applicationDidEnterBackground:.
+ */
+}
+
+@end
View
14 Example/Example/SSViewController.h
@@ -0,0 +1,14 @@
+//
+// SSViewController.h
+// Example
+//
+// Created by Aaron Brethorst on 12/4/11.
+// Copyright (c) 2011 Structlab LLC. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+#import "SSIndicatorLabel.h"
+@interface SSViewController : UIViewController
+@property(nonatomic,retain) IBOutlet SSIndicatorLabel *indicatorLabel;
+- (IBAction)startLoading:(id)sender;
+@end
View
78 Example/Example/SSViewController.m
@@ -0,0 +1,78 @@
+//
+// SSViewController.m
+// Example
+//
+// Created by Aaron Brethorst on 12/4/11.
+// Copyright (c) 2011 Structlab LLC. All rights reserved.
+//
+
+#import "SSViewController.h"
+
+@implementation SSViewController
+@synthesize indicatorLabel;
+
+- (void)didReceiveMemoryWarning
+{
+ [super didReceiveMemoryWarning];
+ // Release any cached data, images, etc that aren't in use.
+}
+
+#pragma mark - View lifecycle
+
+- (void)viewDidLoad
+{
+ [super viewDidLoad];
+
+ self.indicatorLabel.backgroundColor = self.view.backgroundColor;
+ self.indicatorLabel.textLabel.textColor = [UIColor whiteColor];
+ self.indicatorLabel.center = CGPointMake(160, 240);
+ self.indicatorLabel.textLabel.text = NSLocalizedString(@"Load Me!", @"");
+
+ [self.view addSubview:self.indicatorLabel];
+}
+
+- (IBAction)startLoading:(id)sender
+{
+ [self.indicatorLabel startWithText:NSLocalizedString(@"I'm Loading!", @"")];
+
+ [NSTimer scheduledTimerWithTimeInterval:3.f target:self selector:@selector(finishLoading:) userInfo:nil repeats:NO];
+}
+
+- (void)finishLoading:(NSTimer*)timer
+{
+ [self.indicatorLabel completeWithText:NSLocalizedString(@"I Finished Loading!", @"")];
+}
+
+- (void)viewDidUnload
+{
+ [super viewDidUnload];
+ self.indicatorLabel = nil;
+}
+
+- (void)viewWillAppear:(BOOL)animated
+{
+ [super viewWillAppear:animated];
+}
+
+- (void)viewDidAppear:(BOOL)animated
+{
+ [super viewDidAppear:animated];
+}
+
+- (void)viewWillDisappear:(BOOL)animated
+{
+ [super viewWillDisappear:animated];
+}
+
+- (void)viewDidDisappear:(BOOL)animated
+{
+ [super viewDidDisappear:animated];
+}
+
+- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
+{
+ // Return YES for supported orientations
+ return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
+}
+
+@end
View
2  Example/Example/en.lproj/InfoPlist.strings
@@ -0,0 +1,2 @@
+/* Localized versions of Info.plist keys */
+
View
4,627 Example/Example/en.lproj/SSViewController.xib
4,627 additions, 0 deletions not shown
View
18 Example/Example/main.m
@@ -0,0 +1,18 @@
+//
+// main.m
+// Example
+//
+// Created by Aaron Brethorst on 12/4/11.
+// Copyright (c) 2011 Structlab LLC. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+#import "SSAppDelegate.h"
+
+int main(int argc, char *argv[])
+{
+ @autoreleasepool {
+ return UIApplicationMain(argc, argv, nil, NSStringFromClass([SSAppDelegate class]));
+ }
+}
View
33 SSIndicatorLabel.m
@@ -11,6 +11,7 @@
@interface SSIndicatorLabel (PrivateMethods)
+ (CGSize)indicatorSize;
+ (CGFloat)padding;
+- (void)configureView;
@end
@implementation SSIndicatorLabel
@@ -59,21 +60,31 @@ - (void)dealloc {
- (id)initWithFrame:(CGRect)rect {
if ((self = [super initWithFrame:rect])) {
- self.clipsToBounds = YES;
-
- _textLabel = [[UILabel alloc] initWithFrame:CGRectZero];
- [self addSubview:_textLabel];
-
- _activityIndicatorView = [[UIActivityIndicatorView alloc] initWithFrame:CGRectZero];
- [_activityIndicatorView startAnimating];
- [self addSubview:_activityIndicatorView];
-
- _loading = NO;
- [self layoutSubviews];
+ [self configureView];
}
return self;
}
+- (id)initWithCoder:(NSCoder *)aDecoder {
+ if ((self = [super initWithCoder:aDecoder])) {
+ [self configureView];
+ }
+ return self;
+}
+
+- (void)configureView {
+ self.clipsToBounds = YES;
+
+ _textLabel = [[UILabel alloc] initWithFrame:CGRectZero];
+ [self addSubview:_textLabel];
+
+ _activityIndicatorView = [[UIActivityIndicatorView alloc] initWithFrame:CGRectZero];
+ [_activityIndicatorView startAnimating];
+ [self addSubview:_activityIndicatorView];
+
+ _loading = NO;
+ [self layoutSubviews];
+}
- (void)layoutSubviews {
CGRect rect = self.frame;
Please sign in to comment.
Something went wrong with that request. Please try again.