diff --git a/Examples/SampleStoryboard/SimpelKal/SimpelKal.xcodeproj/project.pbxproj b/Examples/SampleStoryboard/SimpelKal/SimpelKal.xcodeproj/project.pbxproj new file mode 100644 index 0000000..daf6c3a --- /dev/null +++ b/Examples/SampleStoryboard/SimpelKal/SimpelKal.xcodeproj/project.pbxproj @@ -0,0 +1,343 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 649D968516837595005DAEB2 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 649D968416837595005DAEB2 /* UIKit.framework */; }; + 649D968716837595005DAEB2 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 649D968616837595005DAEB2 /* Foundation.framework */; }; + 649D968916837595005DAEB2 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 649D968816837595005DAEB2 /* CoreGraphics.framework */; }; + 649D968F16837595005DAEB2 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 649D968D16837595005DAEB2 /* InfoPlist.strings */; }; + 649D969116837595005DAEB2 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 649D969016837595005DAEB2 /* main.m */; }; + 649D969516837595005DAEB2 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 649D969416837595005DAEB2 /* AppDelegate.m */; }; + 649D969716837595005DAEB2 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 649D969616837595005DAEB2 /* Default.png */; }; + 649D969916837595005DAEB2 /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 649D969816837595005DAEB2 /* Default@2x.png */; }; + 649D969B16837595005DAEB2 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 649D969A16837595005DAEB2 /* Default-568h@2x.png */; }; + 649D969E16837595005DAEB2 /* MainStoryboard.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 649D969C16837595005DAEB2 /* MainStoryboard.storyboard */; }; + 649D96A116837595005DAEB2 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 649D96A016837595005DAEB2 /* ViewController.m */; }; + 649D96B0168375BC005DAEB2 /* libKal.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 649D96AF168375A9005DAEB2 /* libKal.a */; }; + 649D96C116837C66005DAEB2 /* Kal.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 649D96C016837C66005DAEB2 /* Kal.bundle */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 649D96AE168375A9005DAEB2 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 649D96A7168375A9005DAEB2 /* Kal.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = D2AAC07E0554694100DB518D; + remoteInfo = Kal; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 649D968016837595005DAEB2 /* SimpelKal.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SimpelKal.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 649D968416837595005DAEB2 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; + 649D968616837595005DAEB2 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + 649D968816837595005DAEB2 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; + 649D968C16837595005DAEB2 /* SimpelKal-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "SimpelKal-Info.plist"; sourceTree = ""; }; + 649D968E16837595005DAEB2 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; + 649D969016837595005DAEB2 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 649D969216837595005DAEB2 /* SimpelKal-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "SimpelKal-Prefix.pch"; sourceTree = ""; }; + 649D969316837595005DAEB2 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + 649D969416837595005DAEB2 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + 649D969616837595005DAEB2 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = ""; }; + 649D969816837595005DAEB2 /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default@2x.png"; sourceTree = ""; }; + 649D969A16837595005DAEB2 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; + 649D969D16837595005DAEB2 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = en; path = en.lproj/MainStoryboard.storyboard; sourceTree = ""; }; + 649D969F16837595005DAEB2 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; + 649D96A016837595005DAEB2 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; + 649D96A7168375A9005DAEB2 /* Kal.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Kal.xcodeproj; path = ../../../src/Kal.xcodeproj; sourceTree = ""; }; + 649D96C016837C66005DAEB2 /* Kal.bundle */ = {isa = PBXFileReference; lastKnownFileType = file; name = Kal.bundle; path = ../../../src/Kal.bundle; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 649D967D16837595005DAEB2 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 649D96B0168375BC005DAEB2 /* libKal.a in Frameworks */, + 649D968516837595005DAEB2 /* UIKit.framework in Frameworks */, + 649D968716837595005DAEB2 /* Foundation.framework in Frameworks */, + 649D968916837595005DAEB2 /* CoreGraphics.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 649D967516837595005DAEB2 = { + isa = PBXGroup; + children = ( + 649D968A16837595005DAEB2 /* SimpelKal */, + 649D968316837595005DAEB2 /* Frameworks */, + 649D968116837595005DAEB2 /* Products */, + ); + sourceTree = ""; + }; + 649D968116837595005DAEB2 /* Products */ = { + isa = PBXGroup; + children = ( + 649D968016837595005DAEB2 /* SimpelKal.app */, + ); + name = Products; + sourceTree = ""; + }; + 649D968316837595005DAEB2 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 649D96C016837C66005DAEB2 /* Kal.bundle */, + 649D96A7168375A9005DAEB2 /* Kal.xcodeproj */, + 649D968416837595005DAEB2 /* UIKit.framework */, + 649D968616837595005DAEB2 /* Foundation.framework */, + 649D968816837595005DAEB2 /* CoreGraphics.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 649D968A16837595005DAEB2 /* SimpelKal */ = { + isa = PBXGroup; + children = ( + 649D969316837595005DAEB2 /* AppDelegate.h */, + 649D969416837595005DAEB2 /* AppDelegate.m */, + 649D969C16837595005DAEB2 /* MainStoryboard.storyboard */, + 649D969F16837595005DAEB2 /* ViewController.h */, + 649D96A016837595005DAEB2 /* ViewController.m */, + 649D968B16837595005DAEB2 /* Supporting Files */, + ); + path = SimpelKal; + sourceTree = ""; + }; + 649D968B16837595005DAEB2 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 649D968C16837595005DAEB2 /* SimpelKal-Info.plist */, + 649D968D16837595005DAEB2 /* InfoPlist.strings */, + 649D969016837595005DAEB2 /* main.m */, + 649D969216837595005DAEB2 /* SimpelKal-Prefix.pch */, + 649D969616837595005DAEB2 /* Default.png */, + 649D969816837595005DAEB2 /* Default@2x.png */, + 649D969A16837595005DAEB2 /* Default-568h@2x.png */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 649D96A8168375A9005DAEB2 /* Products */ = { + isa = PBXGroup; + children = ( + 649D96AF168375A9005DAEB2 /* libKal.a */, + ); + name = Products; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 649D967F16837595005DAEB2 /* SimpelKal */ = { + isa = PBXNativeTarget; + buildConfigurationList = 649D96A416837595005DAEB2 /* Build configuration list for PBXNativeTarget "SimpelKal" */; + buildPhases = ( + 649D967C16837595005DAEB2 /* Sources */, + 649D967D16837595005DAEB2 /* Frameworks */, + 649D967E16837595005DAEB2 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = SimpelKal; + productName = SimpelKal; + productReference = 649D968016837595005DAEB2 /* SimpelKal.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 649D967716837595005DAEB2 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0450; + ORGANIZATIONNAME = yourcompany; + }; + buildConfigurationList = 649D967A16837595005DAEB2 /* Build configuration list for PBXProject "SimpelKal" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 649D967516837595005DAEB2; + productRefGroup = 649D968116837595005DAEB2 /* Products */; + projectDirPath = ""; + projectReferences = ( + { + ProductGroup = 649D96A8168375A9005DAEB2 /* Products */; + ProjectRef = 649D96A7168375A9005DAEB2 /* Kal.xcodeproj */; + }, + ); + projectRoot = ""; + targets = ( + 649D967F16837595005DAEB2 /* SimpelKal */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXReferenceProxy section */ + 649D96AF168375A9005DAEB2 /* libKal.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libKal.a; + remoteRef = 649D96AE168375A9005DAEB2 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + +/* Begin PBXResourcesBuildPhase section */ + 649D967E16837595005DAEB2 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 649D968F16837595005DAEB2 /* InfoPlist.strings in Resources */, + 649D969716837595005DAEB2 /* Default.png in Resources */, + 649D969916837595005DAEB2 /* Default@2x.png in Resources */, + 649D969B16837595005DAEB2 /* Default-568h@2x.png in Resources */, + 649D969E16837595005DAEB2 /* MainStoryboard.storyboard in Resources */, + 649D96C116837C66005DAEB2 /* Kal.bundle in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 649D967C16837595005DAEB2 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 649D969116837595005DAEB2 /* main.m in Sources */, + 649D969516837595005DAEB2 /* AppDelegate.m in Sources */, + 649D96A116837595005DAEB2 /* ViewController.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 649D968D16837595005DAEB2 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 649D968E16837595005DAEB2 /* en */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; + 649D969C16837595005DAEB2 /* MainStoryboard.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 649D969D16837595005DAEB2 /* en */, + ); + name = MainStoryboard.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 649D96A216837595005DAEB2 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "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_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 6.0; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + }; + name = Debug; + }; + 649D96A316837595005DAEB2 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 6.0; + OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 649D96A516837595005DAEB2 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "SimpelKal/SimpelKal-Prefix.pch"; + HEADER_SEARCH_PATHS = ../../../src; + INFOPLIST_FILE = "SimpelKal/SimpelKal-Info.plist"; + OTHER_LDFLAGS = "-all_load"; + PRODUCT_NAME = "$(TARGET_NAME)"; + WRAPPER_EXTENSION = app; + }; + name = Debug; + }; + 649D96A616837595005DAEB2 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "SimpelKal/SimpelKal-Prefix.pch"; + HEADER_SEARCH_PATHS = ../../../src; + INFOPLIST_FILE = "SimpelKal/SimpelKal-Info.plist"; + OTHER_LDFLAGS = "-all_load"; + PRODUCT_NAME = "$(TARGET_NAME)"; + WRAPPER_EXTENSION = app; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 649D967A16837595005DAEB2 /* Build configuration list for PBXProject "SimpelKal" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 649D96A216837595005DAEB2 /* Debug */, + 649D96A316837595005DAEB2 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 649D96A416837595005DAEB2 /* Build configuration list for PBXNativeTarget "SimpelKal" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 649D96A516837595005DAEB2 /* Debug */, + 649D96A616837595005DAEB2 /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; +/* End XCConfigurationList section */ + }; + rootObject = 649D967716837595005DAEB2 /* Project object */; +} diff --git a/Examples/SampleStoryboard/SimpelKal/SimpelKal/AppDelegate.h b/Examples/SampleStoryboard/SimpelKal/SimpelKal/AppDelegate.h new file mode 100644 index 0000000..7290591 --- /dev/null +++ b/Examples/SampleStoryboard/SimpelKal/SimpelKal/AppDelegate.h @@ -0,0 +1,15 @@ +// +// AppDelegate.h +// SimpelKal +// +// Created by Manuel Meyer on 20.12.12. +// Copyright (c) 2012 yourcompany. All rights reserved. +// + +#import + +@interface AppDelegate : UIResponder + +@property (strong, nonatomic) UIWindow *window; + +@end diff --git a/Examples/SampleStoryboard/SimpelKal/SimpelKal/AppDelegate.m b/Examples/SampleStoryboard/SimpelKal/SimpelKal/AppDelegate.m new file mode 100644 index 0000000..46c409d --- /dev/null +++ b/Examples/SampleStoryboard/SimpelKal/SimpelKal/AppDelegate.m @@ -0,0 +1,52 @@ +// +// AppDelegate.m +// SimpelKal +// +// Created by Manuel Meyer on 20.12.12. +// Copyright (c) 2012 yourcompany. All rights reserved. +// + +#import "AppDelegate.h" + +@implementation AppDelegate + +- (void)dealloc +{ + [_window release]; + [super dealloc]; +} + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions +{ + // Override point for customization after application launch. + 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 diff --git a/Examples/SampleStoryboard/SimpelKal/SimpelKal/Default-568h@2x.png b/Examples/SampleStoryboard/SimpelKal/SimpelKal/Default-568h@2x.png new file mode 100644 index 0000000..0891b7a Binary files /dev/null and b/Examples/SampleStoryboard/SimpelKal/SimpelKal/Default-568h@2x.png differ diff --git a/Examples/SampleStoryboard/SimpelKal/SimpelKal/Default.png b/Examples/SampleStoryboard/SimpelKal/SimpelKal/Default.png new file mode 100644 index 0000000..4c8ca6f Binary files /dev/null and b/Examples/SampleStoryboard/SimpelKal/SimpelKal/Default.png differ diff --git a/Examples/SampleStoryboard/SimpelKal/SimpelKal/Default@2x.png b/Examples/SampleStoryboard/SimpelKal/SimpelKal/Default@2x.png new file mode 100644 index 0000000..35b84cf Binary files /dev/null and b/Examples/SampleStoryboard/SimpelKal/SimpelKal/Default@2x.png differ diff --git a/Examples/SampleStoryboard/SimpelKal/SimpelKal/SimpelKal-Info.plist b/Examples/SampleStoryboard/SimpelKal/SimpelKal/SimpelKal-Info.plist new file mode 100644 index 0000000..cee0b4a --- /dev/null +++ b/Examples/SampleStoryboard/SimpelKal/SimpelKal/SimpelKal-Info.plist @@ -0,0 +1,38 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + ${PRODUCT_NAME} + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + com.yourcompany.${PRODUCT_NAME:rfc1034identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + LSRequiresIPhoneOS + + UIMainStoryboardFile + MainStoryboard + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + + + diff --git a/Examples/SampleStoryboard/SimpelKal/SimpelKal/SimpelKal-Prefix.pch b/Examples/SampleStoryboard/SimpelKal/SimpelKal/SimpelKal-Prefix.pch new file mode 100644 index 0000000..57101d7 --- /dev/null +++ b/Examples/SampleStoryboard/SimpelKal/SimpelKal/SimpelKal-Prefix.pch @@ -0,0 +1,14 @@ +// +// Prefix header for all source files of the 'SimpelKal' target in the 'SimpelKal' project +// + +#import + +#ifndef __IPHONE_5_0 +#warning "This project uses features only available in iOS SDK 5.0 and later." +#endif + +#ifdef __OBJC__ + #import + #import +#endif \ No newline at end of file diff --git a/Examples/SampleStoryboard/SimpelKal/SimpelKal/ViewController.h b/Examples/SampleStoryboard/SimpelKal/SimpelKal/ViewController.h new file mode 100644 index 0000000..0200175 --- /dev/null +++ b/Examples/SampleStoryboard/SimpelKal/SimpelKal/ViewController.h @@ -0,0 +1,13 @@ +// +// ViewController.h +// SimpelKal +// +// Created by Manuel Meyer on 20.12.12. +// Copyright (c) 2012 yourcompany. All rights reserved. +// + +#import + +@interface ViewController : UIViewController + +@end diff --git a/Examples/SampleStoryboard/SimpelKal/SimpelKal/ViewController.m b/Examples/SampleStoryboard/SimpelKal/SimpelKal/ViewController.m new file mode 100644 index 0000000..27b37c4 --- /dev/null +++ b/Examples/SampleStoryboard/SimpelKal/SimpelKal/ViewController.m @@ -0,0 +1,29 @@ +// +// ViewController.m +// SimpelKal +// +// Created by Manuel Meyer on 20.12.12. +// Copyright (c) 2012 yourcompany. All rights reserved. +// + +#import "ViewController.h" + +@interface ViewController () + +@end + +@implementation ViewController + +- (void)viewDidLoad +{ + [super viewDidLoad]; + // Do any additional setup after loading the view, typically from a nib. +} + +- (void)didReceiveMemoryWarning +{ + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +@end diff --git a/Examples/SampleStoryboard/SimpelKal/SimpelKal/en.lproj/InfoPlist.strings b/Examples/SampleStoryboard/SimpelKal/SimpelKal/en.lproj/InfoPlist.strings new file mode 100644 index 0000000..477b28f --- /dev/null +++ b/Examples/SampleStoryboard/SimpelKal/SimpelKal/en.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/Examples/SampleStoryboard/SimpelKal/SimpelKal/en.lproj/MainStoryboard.storyboard b/Examples/SampleStoryboard/SimpelKal/SimpelKal/en.lproj/MainStoryboard.storyboard new file mode 100644 index 0000000..3f2c277 --- /dev/null +++ b/Examples/SampleStoryboard/SimpelKal/SimpelKal/en.lproj/MainStoryboard.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Examples/SampleStoryboard/SimpelKal/SimpelKal/main.m b/Examples/SampleStoryboard/SimpelKal/SimpelKal/main.m new file mode 100644 index 0000000..ea9c3ad --- /dev/null +++ b/Examples/SampleStoryboard/SimpelKal/SimpelKal/main.m @@ -0,0 +1,18 @@ +// +// main.m +// SimpelKal +// +// Created by Manuel Meyer on 20.12.12. +// Copyright (c) 2012 yourcompany. All rights reserved. +// + +#import + +#import "AppDelegate.h" + +int main(int argc, char *argv[]) +{ + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); + } +} diff --git a/src/KalLogic.m b/src/KalLogic.m index c15e161..1e9e56f 100644 --- a/src/KalLogic.m +++ b/src/KalLogic.m @@ -47,8 +47,8 @@ - (id)init - (void)moveToMonthForDate:(NSDate *)date { - self.baseDate = [date cc_dateByMovingToFirstDayOfTheMonth]; - [self recalculateVisibleDays]; + self.baseDate = [date cc_dateByMovingToFirstDayOfTheMonth]; + [self recalculateVisibleDays]; } - (void)retreatToPreviousMonth diff --git a/src/KalViewController.m b/src/KalViewController.m index 62245b8..ef4e870 100644 --- a/src/KalViewController.m +++ b/src/KalViewController.m @@ -8,7 +8,7 @@ #import "KalDataSource.h" #import "KalDate.h" #import "KalPrivate.h" - +#import "NSDateAdditions.h" #define PROFILER 0 #if PROFILER #include @@ -40,16 +40,31 @@ @implementation KalViewController @synthesize dataSource, delegate, initialDate, selectedDate; -- (id)initWithSelectedDate:(NSDate *)date +-(void) _configureWithDate:(NSDate *)date { - if ((self = [super init])) { logic = [[KalLogic alloc] initForDate:date]; self.initialDate = date; self.selectedDate = date; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(significantTimeChangeOccurred) name:UIApplicationSignificantTimeChangeNotification object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(reloadData) name:KalDataSourceChangedNotification object:nil]; - } - return self; +} + + +-(id)initWithCoder:(NSCoder *)aDecoder +{ + if ((self = [super initWithCoder:aDecoder])) { + [self _configureWithDate:[NSDate date]]; + } + return self; +} + + +- (id)initWithSelectedDate:(NSDate *)date +{ + if ((self = [super init])) { + [self _configureWithDate:date]; + } + return self; } - (id)init