├── AudioLayer ├── AudioLayer.xcodeproj │ └── project.pbxproj └── AudioLayer │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── AudioLayer-Info.plist │ ├── AudioLayer-Prefix.pch │ ├── AudioLayer.h │ ├── AudioLayer.m │ ├── Base.lproj │ └── Main.storyboard │ ├── Images.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── LaunchImage.launchimage │ │ └── Contents.json │ ├── ViewController.h │ ├── ViewController.m │ ├── en.lproj │ └── InfoPlist.strings │ └── main.m ├── ClockFace ├── ClockFace.xcodeproj │ └── project.pbxproj └── ClockFace │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Base.lproj │ └── Main.storyboard │ ├── ClockFace-Info.plist │ ├── ClockFace-Prefix.pch │ ├── ClockFace.h │ ├── ClockFace.m │ ├── Images.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── LaunchImage.launchimage │ │ └── Contents.json │ ├── ViewController.h │ ├── ViewController.m │ ├── en.lproj │ └── InfoPlist.strings │ └── main.m └── ClockFace2 ├── ClockFace ├── AppDelegate.h ├── AppDelegate.m ├── Base.lproj │ └── Main.storyboard ├── ClockFace.h ├── ClockFace.m ├── ClockFace2-Info.plist ├── ClockFace2-Prefix.pch ├── Images.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── LaunchImage.launchimage │ │ └── Contents.json ├── ViewController.h ├── ViewController.m ├── en.lproj │ └── InfoPlist.strings └── main.m └── ClockFace2.xcodeproj └── project.pbxproj /AudioLayer/AudioLayer.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 01C9F35919137B58003010A8 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 01C9F35819137B58003010A8 /* Foundation.framework */; }; 11 | 01C9F35B19137B58003010A8 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 01C9F35A19137B58003010A8 /* CoreGraphics.framework */; }; 12 | 01C9F35D19137B58003010A8 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 01C9F35C19137B58003010A8 /* UIKit.framework */; }; 13 | 01C9F36319137B58003010A8 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 01C9F36119137B58003010A8 /* InfoPlist.strings */; }; 14 | 01C9F36519137B58003010A8 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 01C9F36419137B58003010A8 /* main.m */; }; 15 | 01C9F36919137B58003010A8 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 01C9F36819137B58003010A8 /* AppDelegate.m */; }; 16 | 01C9F36C19137B58003010A8 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 01C9F36A19137B58003010A8 /* Main.storyboard */; }; 17 | 01C9F36F19137B58003010A8 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 01C9F36E19137B58003010A8 /* ViewController.m */; }; 18 | 01C9F37119137B58003010A8 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 01C9F37019137B58003010A8 /* Images.xcassets */; }; 19 | 01C9F38F19137B9D003010A8 /* AudioLayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 01C9F38E19137B9D003010A8 /* AudioLayer.m */; }; 20 | 01C9F39119137C9C003010A8 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 01C9F39019137C9C003010A8 /* QuartzCore.framework */; }; 21 | 01C9F39319137CA3003010A8 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 01C9F39219137CA3003010A8 /* AVFoundation.framework */; }; 22 | /* End PBXBuildFile section */ 23 | 24 | /* Begin PBXFileReference section */ 25 | 01C9F35519137B58003010A8 /* AudioLayer.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = AudioLayer.app; sourceTree = BUILT_PRODUCTS_DIR; }; 26 | 01C9F35819137B58003010A8 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 27 | 01C9F35A19137B58003010A8 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 28 | 01C9F35C19137B58003010A8 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 29 | 01C9F36019137B58003010A8 /* AudioLayer-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "AudioLayer-Info.plist"; sourceTree = ""; }; 30 | 01C9F36219137B58003010A8 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 31 | 01C9F36419137B58003010A8 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 32 | 01C9F36619137B58003010A8 /* AudioLayer-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "AudioLayer-Prefix.pch"; sourceTree = ""; }; 33 | 01C9F36719137B58003010A8 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 34 | 01C9F36819137B58003010A8 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 35 | 01C9F36B19137B58003010A8 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 36 | 01C9F36D19137B58003010A8 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 37 | 01C9F36E19137B58003010A8 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 38 | 01C9F37019137B58003010A8 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 39 | 01C9F37719137B58003010A8 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; 40 | 01C9F38D19137B9D003010A8 /* AudioLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AudioLayer.h; sourceTree = ""; }; 41 | 01C9F38E19137B9D003010A8 /* AudioLayer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AudioLayer.m; sourceTree = ""; }; 42 | 01C9F39019137C9C003010A8 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; 43 | 01C9F39219137CA3003010A8 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; 44 | /* End PBXFileReference section */ 45 | 46 | /* Begin PBXFrameworksBuildPhase section */ 47 | 01C9F35219137B58003010A8 /* Frameworks */ = { 48 | isa = PBXFrameworksBuildPhase; 49 | buildActionMask = 2147483647; 50 | files = ( 51 | 01C9F39319137CA3003010A8 /* AVFoundation.framework in Frameworks */, 52 | 01C9F39119137C9C003010A8 /* QuartzCore.framework in Frameworks */, 53 | 01C9F35B19137B58003010A8 /* CoreGraphics.framework in Frameworks */, 54 | 01C9F35D19137B58003010A8 /* UIKit.framework in Frameworks */, 55 | 01C9F35919137B58003010A8 /* Foundation.framework in Frameworks */, 56 | ); 57 | runOnlyForDeploymentPostprocessing = 0; 58 | }; 59 | /* End PBXFrameworksBuildPhase section */ 60 | 61 | /* Begin PBXGroup section */ 62 | 01C9F34C19137B58003010A8 = { 63 | isa = PBXGroup; 64 | children = ( 65 | 01C9F35E19137B58003010A8 /* AudioLayer */, 66 | 01C9F35719137B58003010A8 /* Frameworks */, 67 | 01C9F35619137B58003010A8 /* Products */, 68 | ); 69 | sourceTree = ""; 70 | }; 71 | 01C9F35619137B58003010A8 /* Products */ = { 72 | isa = PBXGroup; 73 | children = ( 74 | 01C9F35519137B58003010A8 /* AudioLayer.app */, 75 | ); 76 | name = Products; 77 | sourceTree = ""; 78 | }; 79 | 01C9F35719137B58003010A8 /* Frameworks */ = { 80 | isa = PBXGroup; 81 | children = ( 82 | 01C9F39219137CA3003010A8 /* AVFoundation.framework */, 83 | 01C9F39019137C9C003010A8 /* QuartzCore.framework */, 84 | 01C9F35819137B58003010A8 /* Foundation.framework */, 85 | 01C9F35A19137B58003010A8 /* CoreGraphics.framework */, 86 | 01C9F35C19137B58003010A8 /* UIKit.framework */, 87 | 01C9F37719137B58003010A8 /* XCTest.framework */, 88 | ); 89 | name = Frameworks; 90 | sourceTree = ""; 91 | }; 92 | 01C9F35E19137B58003010A8 /* AudioLayer */ = { 93 | isa = PBXGroup; 94 | children = ( 95 | 01C9F36719137B58003010A8 /* AppDelegate.h */, 96 | 01C9F36819137B58003010A8 /* AppDelegate.m */, 97 | 01C9F36A19137B58003010A8 /* Main.storyboard */, 98 | 01C9F36D19137B58003010A8 /* ViewController.h */, 99 | 01C9F36E19137B58003010A8 /* ViewController.m */, 100 | 01C9F38D19137B9D003010A8 /* AudioLayer.h */, 101 | 01C9F38E19137B9D003010A8 /* AudioLayer.m */, 102 | 01C9F37019137B58003010A8 /* Images.xcassets */, 103 | 01C9F35F19137B58003010A8 /* Supporting Files */, 104 | ); 105 | path = AudioLayer; 106 | sourceTree = ""; 107 | }; 108 | 01C9F35F19137B58003010A8 /* Supporting Files */ = { 109 | isa = PBXGroup; 110 | children = ( 111 | 01C9F36019137B58003010A8 /* AudioLayer-Info.plist */, 112 | 01C9F36119137B58003010A8 /* InfoPlist.strings */, 113 | 01C9F36419137B58003010A8 /* main.m */, 114 | 01C9F36619137B58003010A8 /* AudioLayer-Prefix.pch */, 115 | ); 116 | name = "Supporting Files"; 117 | sourceTree = ""; 118 | }; 119 | /* End PBXGroup section */ 120 | 121 | /* Begin PBXNativeTarget section */ 122 | 01C9F35419137B58003010A8 /* AudioLayer */ = { 123 | isa = PBXNativeTarget; 124 | buildConfigurationList = 01C9F38719137B58003010A8 /* Build configuration list for PBXNativeTarget "AudioLayer" */; 125 | buildPhases = ( 126 | 01C9F35119137B58003010A8 /* Sources */, 127 | 01C9F35219137B58003010A8 /* Frameworks */, 128 | 01C9F35319137B58003010A8 /* Resources */, 129 | ); 130 | buildRules = ( 131 | ); 132 | dependencies = ( 133 | ); 134 | name = AudioLayer; 135 | productName = AudioLayer; 136 | productReference = 01C9F35519137B58003010A8 /* AudioLayer.app */; 137 | productType = "com.apple.product-type.application"; 138 | }; 139 | /* End PBXNativeTarget section */ 140 | 141 | /* Begin PBXProject section */ 142 | 01C9F34D19137B58003010A8 /* Project object */ = { 143 | isa = PBXProject; 144 | attributes = { 145 | LastUpgradeCheck = 0510; 146 | ORGANIZATIONNAME = "Charcoal Design"; 147 | }; 148 | buildConfigurationList = 01C9F35019137B58003010A8 /* Build configuration list for PBXProject "AudioLayer" */; 149 | compatibilityVersion = "Xcode 3.2"; 150 | developmentRegion = English; 151 | hasScannedForEncodings = 0; 152 | knownRegions = ( 153 | en, 154 | Base, 155 | ); 156 | mainGroup = 01C9F34C19137B58003010A8; 157 | productRefGroup = 01C9F35619137B58003010A8 /* Products */; 158 | projectDirPath = ""; 159 | projectRoot = ""; 160 | targets = ( 161 | 01C9F35419137B58003010A8 /* AudioLayer */, 162 | ); 163 | }; 164 | /* End PBXProject section */ 165 | 166 | /* Begin PBXResourcesBuildPhase section */ 167 | 01C9F35319137B58003010A8 /* Resources */ = { 168 | isa = PBXResourcesBuildPhase; 169 | buildActionMask = 2147483647; 170 | files = ( 171 | 01C9F37119137B58003010A8 /* Images.xcassets in Resources */, 172 | 01C9F36319137B58003010A8 /* InfoPlist.strings in Resources */, 173 | 01C9F36C19137B58003010A8 /* Main.storyboard in Resources */, 174 | ); 175 | runOnlyForDeploymentPostprocessing = 0; 176 | }; 177 | /* End PBXResourcesBuildPhase section */ 178 | 179 | /* Begin PBXSourcesBuildPhase section */ 180 | 01C9F35119137B58003010A8 /* Sources */ = { 181 | isa = PBXSourcesBuildPhase; 182 | buildActionMask = 2147483647; 183 | files = ( 184 | 01C9F36F19137B58003010A8 /* ViewController.m in Sources */, 185 | 01C9F36919137B58003010A8 /* AppDelegate.m in Sources */, 186 | 01C9F38F19137B9D003010A8 /* AudioLayer.m in Sources */, 187 | 01C9F36519137B58003010A8 /* main.m in Sources */, 188 | ); 189 | runOnlyForDeploymentPostprocessing = 0; 190 | }; 191 | /* End PBXSourcesBuildPhase section */ 192 | 193 | /* Begin PBXVariantGroup section */ 194 | 01C9F36119137B58003010A8 /* InfoPlist.strings */ = { 195 | isa = PBXVariantGroup; 196 | children = ( 197 | 01C9F36219137B58003010A8 /* en */, 198 | ); 199 | name = InfoPlist.strings; 200 | sourceTree = ""; 201 | }; 202 | 01C9F36A19137B58003010A8 /* Main.storyboard */ = { 203 | isa = PBXVariantGroup; 204 | children = ( 205 | 01C9F36B19137B58003010A8 /* Base */, 206 | ); 207 | name = Main.storyboard; 208 | sourceTree = ""; 209 | }; 210 | /* End PBXVariantGroup section */ 211 | 212 | /* Begin XCBuildConfiguration section */ 213 | 01C9F38519137B58003010A8 /* Debug */ = { 214 | isa = XCBuildConfiguration; 215 | buildSettings = { 216 | ALWAYS_SEARCH_USER_PATHS = NO; 217 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 218 | CLANG_CXX_LIBRARY = "libc++"; 219 | CLANG_ENABLE_MODULES = YES; 220 | CLANG_ENABLE_OBJC_ARC = YES; 221 | CLANG_WARN_BOOL_CONVERSION = YES; 222 | CLANG_WARN_CONSTANT_CONVERSION = YES; 223 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 224 | CLANG_WARN_EMPTY_BODY = YES; 225 | CLANG_WARN_ENUM_CONVERSION = YES; 226 | CLANG_WARN_INT_CONVERSION = YES; 227 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 228 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 229 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 230 | COPY_PHASE_STRIP = NO; 231 | GCC_C_LANGUAGE_STANDARD = gnu99; 232 | GCC_DYNAMIC_NO_PIC = NO; 233 | GCC_OPTIMIZATION_LEVEL = 0; 234 | GCC_PREPROCESSOR_DEFINITIONS = ( 235 | "DEBUG=1", 236 | "$(inherited)", 237 | ); 238 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 239 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 240 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 241 | GCC_WARN_UNDECLARED_SELECTOR = YES; 242 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 243 | GCC_WARN_UNUSED_FUNCTION = YES; 244 | GCC_WARN_UNUSED_VARIABLE = YES; 245 | IPHONEOS_DEPLOYMENT_TARGET = 6.1; 246 | ONLY_ACTIVE_ARCH = YES; 247 | SDKROOT = iphoneos; 248 | }; 249 | name = Debug; 250 | }; 251 | 01C9F38619137B58003010A8 /* Release */ = { 252 | isa = XCBuildConfiguration; 253 | buildSettings = { 254 | ALWAYS_SEARCH_USER_PATHS = NO; 255 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 256 | CLANG_CXX_LIBRARY = "libc++"; 257 | CLANG_ENABLE_MODULES = YES; 258 | CLANG_ENABLE_OBJC_ARC = YES; 259 | CLANG_WARN_BOOL_CONVERSION = YES; 260 | CLANG_WARN_CONSTANT_CONVERSION = YES; 261 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 262 | CLANG_WARN_EMPTY_BODY = YES; 263 | CLANG_WARN_ENUM_CONVERSION = YES; 264 | CLANG_WARN_INT_CONVERSION = YES; 265 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 266 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 267 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 268 | COPY_PHASE_STRIP = YES; 269 | ENABLE_NS_ASSERTIONS = NO; 270 | GCC_C_LANGUAGE_STANDARD = gnu99; 271 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 272 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 273 | GCC_WARN_UNDECLARED_SELECTOR = YES; 274 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 275 | GCC_WARN_UNUSED_FUNCTION = YES; 276 | GCC_WARN_UNUSED_VARIABLE = YES; 277 | IPHONEOS_DEPLOYMENT_TARGET = 6.1; 278 | SDKROOT = iphoneos; 279 | VALIDATE_PRODUCT = YES; 280 | }; 281 | name = Release; 282 | }; 283 | 01C9F38819137B58003010A8 /* Debug */ = { 284 | isa = XCBuildConfiguration; 285 | buildSettings = { 286 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 287 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 288 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 289 | GCC_PREFIX_HEADER = "AudioLayer/AudioLayer-Prefix.pch"; 290 | INFOPLIST_FILE = "AudioLayer/AudioLayer-Info.plist"; 291 | PRODUCT_NAME = "$(TARGET_NAME)"; 292 | WRAPPER_EXTENSION = app; 293 | }; 294 | name = Debug; 295 | }; 296 | 01C9F38919137B58003010A8 /* Release */ = { 297 | isa = XCBuildConfiguration; 298 | buildSettings = { 299 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 300 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 301 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 302 | GCC_PREFIX_HEADER = "AudioLayer/AudioLayer-Prefix.pch"; 303 | INFOPLIST_FILE = "AudioLayer/AudioLayer-Info.plist"; 304 | PRODUCT_NAME = "$(TARGET_NAME)"; 305 | WRAPPER_EXTENSION = app; 306 | }; 307 | name = Release; 308 | }; 309 | /* End XCBuildConfiguration section */ 310 | 311 | /* Begin XCConfigurationList section */ 312 | 01C9F35019137B58003010A8 /* Build configuration list for PBXProject "AudioLayer" */ = { 313 | isa = XCConfigurationList; 314 | buildConfigurations = ( 315 | 01C9F38519137B58003010A8 /* Debug */, 316 | 01C9F38619137B58003010A8 /* Release */, 317 | ); 318 | defaultConfigurationIsVisible = 0; 319 | defaultConfigurationName = Release; 320 | }; 321 | 01C9F38719137B58003010A8 /* Build configuration list for PBXNativeTarget "AudioLayer" */ = { 322 | isa = XCConfigurationList; 323 | buildConfigurations = ( 324 | 01C9F38819137B58003010A8 /* Debug */, 325 | 01C9F38919137B58003010A8 /* Release */, 326 | ); 327 | defaultConfigurationIsVisible = 0; 328 | defaultConfigurationName = Release; 329 | }; 330 | /* End XCConfigurationList section */ 331 | }; 332 | rootObject = 01C9F34D19137B58003010A8 /* Project object */; 333 | } 334 | -------------------------------------------------------------------------------- /AudioLayer/AudioLayer/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // AudioLayer 4 | // 5 | // Created by Nick Lockwood on 29/04/2014. 6 | // Copyright (c) 2014 Charcoal Design. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /AudioLayer/AudioLayer/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // AudioLayer 4 | // 5 | // Created by Nick Lockwood on 29/04/2014. 6 | // Copyright (c) 2014 Charcoal Design. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @implementation AppDelegate 12 | 13 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 14 | { 15 | // Override point for customization after application launch. 16 | return YES; 17 | } 18 | 19 | - (void)applicationWillResignActive:(UIApplication *)application 20 | { 21 | // 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. 22 | // 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. 23 | } 24 | 25 | - (void)applicationDidEnterBackground:(UIApplication *)application 26 | { 27 | // 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. 28 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 29 | } 30 | 31 | - (void)applicationWillEnterForeground:(UIApplication *)application 32 | { 33 | // 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. 34 | } 35 | 36 | - (void)applicationDidBecomeActive:(UIApplication *)application 37 | { 38 | // 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. 39 | } 40 | 41 | - (void)applicationWillTerminate:(UIApplication *)application 42 | { 43 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /AudioLayer/AudioLayer/AudioLayer-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | com.charcoaldesign.AudioLayer.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /AudioLayer/AudioLayer/AudioLayer-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #import 8 | 9 | #ifndef __IPHONE_5_0 10 | #warning "This project uses features only available in iOS SDK 5.0 and later." 11 | #endif 12 | 13 | #ifdef __OBJC__ 14 | #import 15 | #import 16 | #endif 17 | -------------------------------------------------------------------------------- /AudioLayer/AudioLayer/AudioLayer.h: -------------------------------------------------------------------------------- 1 | // 2 | // AudioLayer.h 3 | // AudioLayer 4 | // 5 | // Created by Nick Lockwood on 29/04/2014. 6 | // 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface AudioLayer : CALayer 13 | 14 | - (id)initWithAudioFileURL:(NSURL *)URL; 15 | 16 | @property (nonatomic, assign) float volume; 17 | 18 | - (void)play; 19 | - (void)stop; 20 | - (BOOL)isPlaying; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /AudioLayer/AudioLayer/AudioLayer.m: -------------------------------------------------------------------------------- 1 | // 2 | // AudioLayer.m 3 | // AudioLayer 4 | // 5 | // Created by Nick Lockwood on 29/04/2014. 6 | // Copyright (c) 2014 Charcoal Design. All rights reserved. 7 | // 8 | 9 | #import "AudioLayer.h" 10 | 11 | 12 | @interface AudioLayer () 13 | 14 | @property (nonatomic, strong) AVAudioPlayer *player; 15 | 16 | @end 17 | 18 | 19 | @implementation AudioLayer 20 | 21 | @dynamic volume; 22 | 23 | - (id)initWithAudioFileURL:(NSURL *)URL 24 | { 25 | if ((self = [self init])) 26 | { 27 | self.volume = 1.0; 28 | self.player = [[AVAudioPlayer alloc] initWithContentsOfURL:URL error:NULL]; 29 | } 30 | return self; 31 | } 32 | 33 | - (void)play 34 | { 35 | [self.player play]; 36 | } 37 | 38 | - (void)stop 39 | { 40 | [self.player stop]; 41 | } 42 | 43 | - (BOOL)isPlaying 44 | { 45 | return self.player.playing; 46 | } 47 | 48 | + (BOOL)needsDisplayForKey:(NSString *)key 49 | { 50 | if ([@"volume" isEqualToString:key]) 51 | { 52 | return YES; 53 | } 54 | return [super needsDisplayForKey:key]; 55 | } 56 | 57 | - (id)actionForKey:(NSString *)key 58 | { 59 | if ([key isEqualToString:@"volume"]) 60 | { 61 | CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:key]; 62 | animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionLinear]; 63 | animation.fromValue = @([[self presentationLayer] volume]); 64 | return animation; 65 | } 66 | return [super actionForKey:key]; 67 | } 68 | 69 | - (void)display 70 | { 71 | NSLog(@"volume: %f", [self.presentationLayer volume]); 72 | 73 | //set audio volume to interpolated volume value 74 | self.player.volume = [self.presentationLayer volume]; 75 | } 76 | 77 | @end 78 | -------------------------------------------------------------------------------- /AudioLayer/AudioLayer/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 30 | 40 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /AudioLayer/AudioLayer/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /AudioLayer/AudioLayer/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /AudioLayer/AudioLayer/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // AudioLayerViewController.h 3 | // AudioLayer 4 | // 5 | // Created by Nick Lockwood on 31/03/2011. 6 | // Copyright 2011 Charcoal Design. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface ViewController : UIViewController 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /AudioLayer/AudioLayer/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // AudioLayerViewController.m 3 | // AudioLayer 4 | // 5 | // Created by Nick Lockwood on 29/04/2014. 6 | // Copyright (c) 2014 Charcoal Design. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import "AudioLayer.h" 11 | 12 | 13 | @interface ViewController () 14 | 15 | @property (nonatomic, strong) AudioLayer *audioLayer; 16 | 17 | @end 18 | 19 | 20 | @implementation ViewController 21 | 22 | - (void)viewDidLoad 23 | { 24 | [super viewDidLoad]; 25 | 26 | NSURL *musicURL = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"music" ofType:@"caf"]]; 27 | self.audioLayer = [[AudioLayer alloc] initWithAudioFileURL:musicURL]; 28 | [self.view.layer addSublayer:self.audioLayer]; 29 | } 30 | 31 | - (IBAction)playPauseMusic:(UIButton *)sender 32 | { 33 | if ([self.audioLayer isPlaying]) 34 | { 35 | [self.audioLayer stop]; 36 | [sender setTitle:@"Play Music" forState:UIControlStateNormal]; 37 | } 38 | else 39 | { 40 | [self.audioLayer play]; 41 | [sender setTitle:@"Pause Music" forState:UIControlStateNormal]; 42 | } 43 | } 44 | 45 | - (IBAction)fadeIn 46 | { 47 | self.audioLayer.volume = 1; 48 | } 49 | 50 | - (IBAction)fadeOut 51 | { 52 | self.audioLayer.volume = 0; 53 | } 54 | 55 | @end 56 | -------------------------------------------------------------------------------- /AudioLayer/AudioLayer/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /AudioLayer/AudioLayer/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // AudioLayer 4 | // 5 | // Created by Nick Lockwood on 29/04/2014. 6 | // Copyright (c) 2014 Charcoal Design. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "AppDelegate.h" 12 | 13 | int main(int argc, char * argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /ClockFace/ClockFace.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 017AF7C2190E833100AA6D9D /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 017AF7C1190E833100AA6D9D /* Foundation.framework */; }; 11 | 017AF7C4190E833100AA6D9D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 017AF7C3190E833100AA6D9D /* CoreGraphics.framework */; }; 12 | 017AF7C6190E833100AA6D9D /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 017AF7C5190E833100AA6D9D /* UIKit.framework */; }; 13 | 017AF7CC190E833100AA6D9D /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 017AF7CA190E833100AA6D9D /* InfoPlist.strings */; }; 14 | 017AF7CE190E833100AA6D9D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 017AF7CD190E833100AA6D9D /* main.m */; }; 15 | 017AF7D2190E833100AA6D9D /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 017AF7D1190E833100AA6D9D /* AppDelegate.m */; }; 16 | 017AF7D5190E833100AA6D9D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 017AF7D3190E833100AA6D9D /* Main.storyboard */; }; 17 | 017AF7D8190E833100AA6D9D /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 017AF7D7190E833100AA6D9D /* ViewController.m */; }; 18 | 017AF7DA190E833100AA6D9D /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 017AF7D9190E833100AA6D9D /* Images.xcassets */; }; 19 | 017AF7F8190E835100AA6D9D /* ClockFace.m in Sources */ = {isa = PBXBuildFile; fileRef = 017AF7F7190E835100AA6D9D /* ClockFace.m */; }; 20 | /* End PBXBuildFile section */ 21 | 22 | /* Begin PBXFileReference section */ 23 | 017AF7BE190E833100AA6D9D /* ClockFace.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ClockFace.app; sourceTree = BUILT_PRODUCTS_DIR; }; 24 | 017AF7C1190E833100AA6D9D /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 25 | 017AF7C3190E833100AA6D9D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 26 | 017AF7C5190E833100AA6D9D /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 27 | 017AF7C9190E833100AA6D9D /* ClockFace-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "ClockFace-Info.plist"; sourceTree = ""; }; 28 | 017AF7CB190E833100AA6D9D /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 29 | 017AF7CD190E833100AA6D9D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 30 | 017AF7CF190E833100AA6D9D /* ClockFace-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "ClockFace-Prefix.pch"; sourceTree = ""; }; 31 | 017AF7D0190E833100AA6D9D /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 32 | 017AF7D1190E833100AA6D9D /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 33 | 017AF7D4190E833100AA6D9D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 34 | 017AF7D6190E833100AA6D9D /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 35 | 017AF7D7190E833100AA6D9D /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 36 | 017AF7D9190E833100AA6D9D /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 37 | 017AF7E0190E833100AA6D9D /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; 38 | 017AF7F6190E835100AA6D9D /* ClockFace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ClockFace.h; sourceTree = ""; }; 39 | 017AF7F7190E835100AA6D9D /* ClockFace.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ClockFace.m; sourceTree = ""; }; 40 | /* End PBXFileReference section */ 41 | 42 | /* Begin PBXFrameworksBuildPhase section */ 43 | 017AF7BB190E833100AA6D9D /* Frameworks */ = { 44 | isa = PBXFrameworksBuildPhase; 45 | buildActionMask = 2147483647; 46 | files = ( 47 | 017AF7C4190E833100AA6D9D /* CoreGraphics.framework in Frameworks */, 48 | 017AF7C6190E833100AA6D9D /* UIKit.framework in Frameworks */, 49 | 017AF7C2190E833100AA6D9D /* Foundation.framework in Frameworks */, 50 | ); 51 | runOnlyForDeploymentPostprocessing = 0; 52 | }; 53 | /* End PBXFrameworksBuildPhase section */ 54 | 55 | /* Begin PBXGroup section */ 56 | 017AF7B5190E833100AA6D9D = { 57 | isa = PBXGroup; 58 | children = ( 59 | 017AF7C7190E833100AA6D9D /* ClockFace */, 60 | 017AF7C0190E833100AA6D9D /* Frameworks */, 61 | 017AF7BF190E833100AA6D9D /* Products */, 62 | ); 63 | sourceTree = ""; 64 | }; 65 | 017AF7BF190E833100AA6D9D /* Products */ = { 66 | isa = PBXGroup; 67 | children = ( 68 | 017AF7BE190E833100AA6D9D /* ClockFace.app */, 69 | ); 70 | name = Products; 71 | sourceTree = ""; 72 | }; 73 | 017AF7C0190E833100AA6D9D /* Frameworks */ = { 74 | isa = PBXGroup; 75 | children = ( 76 | 017AF7C1190E833100AA6D9D /* Foundation.framework */, 77 | 017AF7C3190E833100AA6D9D /* CoreGraphics.framework */, 78 | 017AF7C5190E833100AA6D9D /* UIKit.framework */, 79 | 017AF7E0190E833100AA6D9D /* XCTest.framework */, 80 | ); 81 | name = Frameworks; 82 | sourceTree = ""; 83 | }; 84 | 017AF7C7190E833100AA6D9D /* ClockFace */ = { 85 | isa = PBXGroup; 86 | children = ( 87 | 017AF7D0190E833100AA6D9D /* AppDelegate.h */, 88 | 017AF7D1190E833100AA6D9D /* AppDelegate.m */, 89 | 017AF7D3190E833100AA6D9D /* Main.storyboard */, 90 | 017AF7F6190E835100AA6D9D /* ClockFace.h */, 91 | 017AF7F7190E835100AA6D9D /* ClockFace.m */, 92 | 017AF7D6190E833100AA6D9D /* ViewController.h */, 93 | 017AF7D7190E833100AA6D9D /* ViewController.m */, 94 | 017AF7D9190E833100AA6D9D /* Images.xcassets */, 95 | 017AF7C8190E833100AA6D9D /* Supporting Files */, 96 | ); 97 | path = ClockFace; 98 | sourceTree = ""; 99 | }; 100 | 017AF7C8190E833100AA6D9D /* Supporting Files */ = { 101 | isa = PBXGroup; 102 | children = ( 103 | 017AF7C9190E833100AA6D9D /* ClockFace-Info.plist */, 104 | 017AF7CA190E833100AA6D9D /* InfoPlist.strings */, 105 | 017AF7CD190E833100AA6D9D /* main.m */, 106 | 017AF7CF190E833100AA6D9D /* ClockFace-Prefix.pch */, 107 | ); 108 | name = "Supporting Files"; 109 | sourceTree = ""; 110 | }; 111 | /* End PBXGroup section */ 112 | 113 | /* Begin PBXNativeTarget section */ 114 | 017AF7BD190E833100AA6D9D /* ClockFace */ = { 115 | isa = PBXNativeTarget; 116 | buildConfigurationList = 017AF7F0190E833100AA6D9D /* Build configuration list for PBXNativeTarget "ClockFace" */; 117 | buildPhases = ( 118 | 017AF7BA190E833100AA6D9D /* Sources */, 119 | 017AF7BB190E833100AA6D9D /* Frameworks */, 120 | 017AF7BC190E833100AA6D9D /* Resources */, 121 | ); 122 | buildRules = ( 123 | ); 124 | dependencies = ( 125 | ); 126 | name = ClockFace; 127 | productName = ClockFace; 128 | productReference = 017AF7BE190E833100AA6D9D /* ClockFace.app */; 129 | productType = "com.apple.product-type.application"; 130 | }; 131 | /* End PBXNativeTarget section */ 132 | 133 | /* Begin PBXProject section */ 134 | 017AF7B6190E833100AA6D9D /* Project object */ = { 135 | isa = PBXProject; 136 | attributes = { 137 | LastUpgradeCheck = 0510; 138 | ORGANIZATIONNAME = "Charcoal Design"; 139 | }; 140 | buildConfigurationList = 017AF7B9190E833100AA6D9D /* Build configuration list for PBXProject "ClockFace" */; 141 | compatibilityVersion = "Xcode 3.2"; 142 | developmentRegion = English; 143 | hasScannedForEncodings = 0; 144 | knownRegions = ( 145 | en, 146 | Base, 147 | ); 148 | mainGroup = 017AF7B5190E833100AA6D9D; 149 | productRefGroup = 017AF7BF190E833100AA6D9D /* Products */; 150 | projectDirPath = ""; 151 | projectRoot = ""; 152 | targets = ( 153 | 017AF7BD190E833100AA6D9D /* ClockFace */, 154 | ); 155 | }; 156 | /* End PBXProject section */ 157 | 158 | /* Begin PBXResourcesBuildPhase section */ 159 | 017AF7BC190E833100AA6D9D /* Resources */ = { 160 | isa = PBXResourcesBuildPhase; 161 | buildActionMask = 2147483647; 162 | files = ( 163 | 017AF7DA190E833100AA6D9D /* Images.xcassets in Resources */, 164 | 017AF7CC190E833100AA6D9D /* InfoPlist.strings in Resources */, 165 | 017AF7D5190E833100AA6D9D /* Main.storyboard in Resources */, 166 | ); 167 | runOnlyForDeploymentPostprocessing = 0; 168 | }; 169 | /* End PBXResourcesBuildPhase section */ 170 | 171 | /* Begin PBXSourcesBuildPhase section */ 172 | 017AF7BA190E833100AA6D9D /* Sources */ = { 173 | isa = PBXSourcesBuildPhase; 174 | buildActionMask = 2147483647; 175 | files = ( 176 | 017AF7D8190E833100AA6D9D /* ViewController.m in Sources */, 177 | 017AF7F8190E835100AA6D9D /* ClockFace.m in Sources */, 178 | 017AF7D2190E833100AA6D9D /* AppDelegate.m in Sources */, 179 | 017AF7CE190E833100AA6D9D /* main.m in Sources */, 180 | ); 181 | runOnlyForDeploymentPostprocessing = 0; 182 | }; 183 | /* End PBXSourcesBuildPhase section */ 184 | 185 | /* Begin PBXVariantGroup section */ 186 | 017AF7CA190E833100AA6D9D /* InfoPlist.strings */ = { 187 | isa = PBXVariantGroup; 188 | children = ( 189 | 017AF7CB190E833100AA6D9D /* en */, 190 | ); 191 | name = InfoPlist.strings; 192 | sourceTree = ""; 193 | }; 194 | 017AF7D3190E833100AA6D9D /* Main.storyboard */ = { 195 | isa = PBXVariantGroup; 196 | children = ( 197 | 017AF7D4190E833100AA6D9D /* Base */, 198 | ); 199 | name = Main.storyboard; 200 | sourceTree = ""; 201 | }; 202 | /* End PBXVariantGroup section */ 203 | 204 | /* Begin XCBuildConfiguration section */ 205 | 017AF7EE190E833100AA6D9D /* Debug */ = { 206 | isa = XCBuildConfiguration; 207 | buildSettings = { 208 | ALWAYS_SEARCH_USER_PATHS = NO; 209 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 210 | CLANG_CXX_LIBRARY = "libc++"; 211 | CLANG_ENABLE_MODULES = YES; 212 | CLANG_ENABLE_OBJC_ARC = YES; 213 | CLANG_WARN_BOOL_CONVERSION = YES; 214 | CLANG_WARN_CONSTANT_CONVERSION = YES; 215 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 216 | CLANG_WARN_EMPTY_BODY = YES; 217 | CLANG_WARN_ENUM_CONVERSION = YES; 218 | CLANG_WARN_INT_CONVERSION = YES; 219 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 220 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 221 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 222 | COPY_PHASE_STRIP = NO; 223 | GCC_C_LANGUAGE_STANDARD = gnu99; 224 | GCC_DYNAMIC_NO_PIC = NO; 225 | GCC_OPTIMIZATION_LEVEL = 0; 226 | GCC_PREPROCESSOR_DEFINITIONS = ( 227 | "DEBUG=1", 228 | "$(inherited)", 229 | ); 230 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 231 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 232 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 233 | GCC_WARN_UNDECLARED_SELECTOR = YES; 234 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 235 | GCC_WARN_UNUSED_FUNCTION = YES; 236 | GCC_WARN_UNUSED_VARIABLE = YES; 237 | IPHONEOS_DEPLOYMENT_TARGET = 6.1; 238 | ONLY_ACTIVE_ARCH = YES; 239 | SDKROOT = iphoneos; 240 | }; 241 | name = Debug; 242 | }; 243 | 017AF7EF190E833100AA6D9D /* Release */ = { 244 | isa = XCBuildConfiguration; 245 | buildSettings = { 246 | ALWAYS_SEARCH_USER_PATHS = NO; 247 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 248 | CLANG_CXX_LIBRARY = "libc++"; 249 | CLANG_ENABLE_MODULES = YES; 250 | CLANG_ENABLE_OBJC_ARC = YES; 251 | CLANG_WARN_BOOL_CONVERSION = YES; 252 | CLANG_WARN_CONSTANT_CONVERSION = YES; 253 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 254 | CLANG_WARN_EMPTY_BODY = YES; 255 | CLANG_WARN_ENUM_CONVERSION = YES; 256 | CLANG_WARN_INT_CONVERSION = YES; 257 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 258 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 259 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 260 | COPY_PHASE_STRIP = YES; 261 | ENABLE_NS_ASSERTIONS = NO; 262 | GCC_C_LANGUAGE_STANDARD = gnu99; 263 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 264 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 265 | GCC_WARN_UNDECLARED_SELECTOR = YES; 266 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 267 | GCC_WARN_UNUSED_FUNCTION = YES; 268 | GCC_WARN_UNUSED_VARIABLE = YES; 269 | IPHONEOS_DEPLOYMENT_TARGET = 6.1; 270 | SDKROOT = iphoneos; 271 | VALIDATE_PRODUCT = YES; 272 | }; 273 | name = Release; 274 | }; 275 | 017AF7F1190E833100AA6D9D /* Debug */ = { 276 | isa = XCBuildConfiguration; 277 | buildSettings = { 278 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 279 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 280 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 281 | GCC_PREFIX_HEADER = "ClockFace/ClockFace-Prefix.pch"; 282 | INFOPLIST_FILE = "ClockFace/ClockFace-Info.plist"; 283 | PRODUCT_NAME = "$(TARGET_NAME)"; 284 | WRAPPER_EXTENSION = app; 285 | }; 286 | name = Debug; 287 | }; 288 | 017AF7F2190E833100AA6D9D /* Release */ = { 289 | isa = XCBuildConfiguration; 290 | buildSettings = { 291 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 292 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 293 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 294 | GCC_PREFIX_HEADER = "ClockFace/ClockFace-Prefix.pch"; 295 | INFOPLIST_FILE = "ClockFace/ClockFace-Info.plist"; 296 | PRODUCT_NAME = "$(TARGET_NAME)"; 297 | WRAPPER_EXTENSION = app; 298 | }; 299 | name = Release; 300 | }; 301 | /* End XCBuildConfiguration section */ 302 | 303 | /* Begin XCConfigurationList section */ 304 | 017AF7B9190E833100AA6D9D /* Build configuration list for PBXProject "ClockFace" */ = { 305 | isa = XCConfigurationList; 306 | buildConfigurations = ( 307 | 017AF7EE190E833100AA6D9D /* Debug */, 308 | 017AF7EF190E833100AA6D9D /* Release */, 309 | ); 310 | defaultConfigurationIsVisible = 0; 311 | defaultConfigurationName = Release; 312 | }; 313 | 017AF7F0190E833100AA6D9D /* Build configuration list for PBXNativeTarget "ClockFace" */ = { 314 | isa = XCConfigurationList; 315 | buildConfigurations = ( 316 | 017AF7F1190E833100AA6D9D /* Debug */, 317 | 017AF7F2190E833100AA6D9D /* Release */, 318 | ); 319 | defaultConfigurationIsVisible = 0; 320 | defaultConfigurationName = Release; 321 | }; 322 | /* End XCConfigurationList section */ 323 | }; 324 | rootObject = 017AF7B6190E833100AA6D9D /* Project object */; 325 | } 326 | -------------------------------------------------------------------------------- /ClockFace/ClockFace/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // ClockFace 4 | // 5 | // Created by Nick Lockwood on 28/04/2014. 6 | // Copyright (c) 2014 Charcoal Design. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /ClockFace/ClockFace/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // ClockFace 4 | // 5 | // Created by Nick Lockwood on 28/04/2014. 6 | // Copyright (c) 2014 Charcoal Design. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @implementation AppDelegate 12 | 13 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 14 | { 15 | // Override point for customization after application launch. 16 | return YES; 17 | } 18 | 19 | - (void)applicationWillResignActive:(UIApplication *)application 20 | { 21 | // 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. 22 | // 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. 23 | } 24 | 25 | - (void)applicationDidEnterBackground:(UIApplication *)application 26 | { 27 | // 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. 28 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 29 | } 30 | 31 | - (void)applicationWillEnterForeground:(UIApplication *)application 32 | { 33 | // 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. 34 | } 35 | 36 | - (void)applicationDidBecomeActive:(UIApplication *)application 37 | { 38 | // 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. 39 | } 40 | 41 | - (void)applicationWillTerminate:(UIApplication *)application 42 | { 43 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /ClockFace/ClockFace/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | VFppZgAAAAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAAAAAC5AAAABAAAABCepkign7sVkKCGKqChmveQ 24 | y4kaoNIj9HDSYSYQ1v50INiArZDa/tGg28CQENzes6DdqayQ3r6VoN+JjpDgnneg4WlwkOJ+WaDjSVKQ 25 | 5F47oOUpNJDmR1gg5xJREOgnOiDo8jMQ6gccIOrSFRDr5v4g7LH3EO3G4CDukdkQ76/8oPBxuxDxj96g 26 | 8n/BkPNvwKD0X6OQ9U+ioPY/hZD3L4Sg+CiiEPkPZqD6CIQQ+viDIPvoZhD82GUg/chIEP64RyD/qCoQ 27 | AJgpIAGIDBACeAsgA3EokARhJ6AFUQqQBkEJoAcw7JAHjUOgCRDOkAmtvyAK8LCQC+CvoAzZzRANwJGg 28 | DrmvEA+priAQmZEQEYmQIBJ5cxATaXIgFFlVEBVJVCAWOTcQFyk2IBgiU5AZCRggGgI1kBryNKAb4heQ 29 | HNIWoB3B+ZAesfigH6HbkCB2KyAhgb2QIlYNICNq2hAkNe8gJUq8ECYV0SAnKp4QJ/7toCkKgBAp3s+g 30 | KupiECu+saAs036QLZ6ToC6zYJAvfnWgMJNCkDFnkiAycySQM0d0IDRTBpA1J1YgNjLokDcHOCA4HAUQ 31 | OOcaIDn75xA6xvwgO9vJEDywGKA9u6sQPo/6oD+bjRBAb9ygQYSpkEJPvqBDZIuQRC+goEVEbZBF89Mg 32 | Ry2KEEfTtSBJDWwQSbOXIErtThBLnLOgTNZqkE18laBOtkyQT1x3oFCWLpBRPFmgUnYQkFMcO6BUVfKQ 33 | VPwdoFY11JBW5TogWB7xEFjFHCBZ/tMQWqT+IFvetRBchOAgXb6XEF5kwiBfnnkQYE3eoGGHlZBiLcCg 34 | Y2d3kGQNoqBlR1mQZe2EoGcnO5BnzWagaQcdkGmtSKBq5v+Qa5ZlIGzQHBBtdkcgbq/+EG9WKSBwj+AQ 35 | cTYLIHJvwhBzFe0gdE+kEHT/CaB2OMCQdt7roHgYopB4vs2gefiEkHqer6B72GaQfH6RoH24SJB+XnOg 36 | f5gqkAABAAECAwEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEA 37 | AQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEA 38 | AQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEA 39 | AQABAAEAAQAB//+dkAEA//+PgAAE//+dkAEI//+dkAEMUERUAFBTVABQV1QAUFBUAAAAAAEAAAABA 40 | 41 | 42 | 43 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /ClockFace/ClockFace/ClockFace-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | com.charcoaldesign.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /ClockFace/ClockFace/ClockFace-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #import 8 | 9 | #ifndef __IPHONE_5_0 10 | #warning "This project uses features only available in iOS SDK 5.0 and later." 11 | #endif 12 | 13 | #ifdef __OBJC__ 14 | #import 15 | #import 16 | #endif 17 | -------------------------------------------------------------------------------- /ClockFace/ClockFace/ClockFace.h: -------------------------------------------------------------------------------- 1 | // 2 | // ClockFace.h 3 | // ClockFace 4 | // 5 | // Created by Nick Lockwood on 28/04/2014. 6 | // Copyright (c) 2014 Charcoal Design. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface ClockFace: CAShapeLayer 13 | 14 | @property (nonatomic, strong) NSDate *time; 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /ClockFace/ClockFace/ClockFace.m: -------------------------------------------------------------------------------- 1 | // 2 | // ClockFace.m 3 | // ClockFace 4 | // 5 | // Created by Nick Lockwood on 28/04/2014. 6 | // Copyright (c) 2014 Charcoal Design. All rights reserved. 7 | // 8 | 9 | #import "ClockFace.h" 10 | 11 | 12 | @interface ClockFace () 13 | 14 | //private properties 15 | @property (nonatomic, strong) CAShapeLayer *hourHand; 16 | @property (nonatomic, strong) CAShapeLayer *minuteHand; 17 | 18 | @end 19 | 20 | 21 | @implementation ClockFace 22 | 23 | - (id)init 24 | { 25 | if ((self = [super init])) 26 | { 27 | self.bounds = CGRectMake(0, 0, 200, 200); 28 | self.path = [UIBezierPath bezierPathWithOvalInRect:self.bounds].CGPath; 29 | self.fillColor = [UIColor whiteColor].CGColor; 30 | self.strokeColor = [UIColor blackColor].CGColor; 31 | self.lineWidth = 4; 32 | 33 | self.hourHand = [CAShapeLayer layer]; 34 | self.hourHand.path = [UIBezierPath bezierPathWithRect:CGRectMake(-2, -80, 4, 80)].CGPath; 35 | self.hourHand.fillColor = [UIColor blackColor].CGColor; 36 | self.hourHand.position = CGPointMake(self.bounds.size.width / 2, self.bounds.size.height / 2); 37 | [self addSublayer:self.hourHand]; 38 | 39 | self.minuteHand = [CAShapeLayer layer]; 40 | self.minuteHand.path = [UIBezierPath bezierPathWithRect:CGRectMake(-1, -90, 2, 90)].CGPath; 41 | self.minuteHand.fillColor = [UIColor blackColor].CGColor; 42 | self.minuteHand.position = CGPointMake(self.bounds.size.width / 2, self.bounds.size.height / 2); 43 | [self addSublayer:self.minuteHand]; 44 | } 45 | return self; 46 | } 47 | 48 | - (void)setTime:(NSDate *)time 49 | { 50 | _time = time; 51 | 52 | NSCalendar *calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar]; 53 | NSDateComponents *components = [calendar components:NSHourCalendarUnit | NSMinuteCalendarUnit fromDate:time]; 54 | self.hourHand.affineTransform = CGAffineTransformMakeRotation(components.hour / 12.0 * 2.0 * M_PI); 55 | self.minuteHand.affineTransform = CGAffineTransformMakeRotation(components.minute / 60.0 * 2.0 * M_PI); 56 | } 57 | 58 | @end -------------------------------------------------------------------------------- /ClockFace/ClockFace/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ClockFace/ClockFace/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ClockFace/ClockFace/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // ClockFace 4 | // 5 | // Created by Nick Lockwood on 28/04/2014. 6 | // Copyright (c) 2014 Charcoal Design. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /ClockFace/ClockFace/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // ClockFace 4 | // 5 | // Created by Nick Lockwood on 28/04/2014. 6 | // Copyright (c) 2014 Charcoal Design. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import "ClockFace.h" 11 | 12 | 13 | @interface ViewController () 14 | 15 | @property (nonatomic, strong) IBOutlet UIDatePicker *datePicker; 16 | @property (nonatomic, strong) ClockFace *clockFace; 17 | 18 | @end 19 | 20 | 21 | @implementation ViewController 22 | 23 | - (void)viewDidLoad 24 | { 25 | [super viewDidLoad]; 26 | 27 | //add clock face layer 28 | self.clockFace = [[ClockFace alloc] init]; 29 | self.clockFace.position = CGPointMake(self.view.bounds.size.width / 2, 150); 30 | [self.view.layer addSublayer:self.clockFace]; 31 | 32 | //set default time 33 | self.clockFace.time = [NSDate date]; 34 | } 35 | 36 | - (IBAction)setTime 37 | { 38 | self.clockFace.time = self.datePicker.date; 39 | } 40 | 41 | @end 42 | -------------------------------------------------------------------------------- /ClockFace/ClockFace/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /ClockFace/ClockFace/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // ClockFace 4 | // 5 | // Created by Nick Lockwood on 28/04/2014. 6 | // Copyright (c) 2014 Charcoal Design. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "AppDelegate.h" 12 | 13 | int main(int argc, char * argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /ClockFace2/ClockFace/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // ClockFace 4 | // 5 | // Created by Nick Lockwood on 28/04/2014. 6 | // Copyright (c) 2014 Charcoal Design. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /ClockFace2/ClockFace/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // ClockFace 4 | // 5 | // Created by Nick Lockwood on 28/04/2014. 6 | // Copyright (c) 2014 Charcoal Design. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @implementation AppDelegate 12 | 13 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 14 | { 15 | // Override point for customization after application launch. 16 | return YES; 17 | } 18 | 19 | - (void)applicationWillResignActive:(UIApplication *)application 20 | { 21 | // 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. 22 | // 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. 23 | } 24 | 25 | - (void)applicationDidEnterBackground:(UIApplication *)application 26 | { 27 | // 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. 28 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 29 | } 30 | 31 | - (void)applicationWillEnterForeground:(UIApplication *)application 32 | { 33 | // 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. 34 | } 35 | 36 | - (void)applicationDidBecomeActive:(UIApplication *)application 37 | { 38 | // 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. 39 | } 40 | 41 | - (void)applicationWillTerminate:(UIApplication *)application 42 | { 43 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /ClockFace2/ClockFace/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /ClockFace2/ClockFace/ClockFace.h: -------------------------------------------------------------------------------- 1 | // 2 | // ClockFace.h 3 | // ClockFace 4 | // 5 | // Created by Nick Lockwood on 28/04/2014. 6 | // Copyright (c) 2014 Charcoal Design. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface ClockFace: CALayer 13 | 14 | @property (nonatomic, assign) float time; 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /ClockFace2/ClockFace/ClockFace.m: -------------------------------------------------------------------------------- 1 | // 2 | // ClockFace.m 3 | // ClockFace 4 | // 5 | // Created by Nick Lockwood on 28/04/2014. 6 | // Copyright (c) 2014 Charcoal Design. All rights reserved. 7 | // 8 | 9 | #import "ClockFace.h" 10 | 11 | 12 | @implementation ClockFace 13 | 14 | @dynamic time; 15 | 16 | - (id)init 17 | { 18 | if ((self = [super init])) 19 | { 20 | self.bounds = CGRectMake(0, 0, 200, 200); 21 | [self setNeedsDisplay]; 22 | } 23 | return self; 24 | } 25 | 26 | + (BOOL)needsDisplayForKey:(NSString *)key 27 | { 28 | if ([@"time" isEqualToString:key]) 29 | { 30 | return YES; 31 | } 32 | return [super needsDisplayForKey:key]; 33 | } 34 | 35 | - (id)actionForKey:(NSString *)key 36 | { 37 | if ([key isEqualToString:@"time"]) 38 | { 39 | CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:key]; 40 | animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionLinear]; 41 | animation.fromValue = @([[self presentationLayer] time]); 42 | return animation; 43 | } 44 | return [super actionForKey:key]; 45 | } 46 | 47 | - (void)display 48 | { 49 | NSLog(@"time: %f", [self.presentationLayer time]); 50 | 51 | //get interpolated time value 52 | float time = [self.presentationLayer time]; 53 | 54 | //create drawing context 55 | UIGraphicsBeginImageContextWithOptions(self.bounds.size, NO, 0); 56 | CGContextRef ctx = UIGraphicsGetCurrentContext(); 57 | 58 | //draw clock face 59 | CGContextSetLineWidth(ctx, 4); 60 | CGContextStrokeEllipseInRect(ctx, CGRectInset(self.bounds, 2, 2)); 61 | 62 | //draw hour hand 63 | CGFloat angle = time / 12.0 * 2.0 * M_PI; 64 | CGPoint center = CGPointMake(self.bounds.size.width / 2, self.bounds.size.height / 2); 65 | CGContextSetLineWidth(ctx, 4); 66 | CGContextMoveToPoint(ctx, center.x, center.y); 67 | CGContextAddLineToPoint(ctx, center.x + sin(angle) * 80, center.y - cos(angle) * 80); 68 | CGContextStrokePath(ctx); 69 | 70 | //draw minute hand 71 | angle = (time - floor(time)) * 2.0 * M_PI; 72 | CGContextSetLineWidth(ctx, 2); 73 | CGContextMoveToPoint(ctx, center.x, center.y); 74 | CGContextAddLineToPoint(ctx, center.x + sin(angle) * 90, center.y - cos(angle) * 90); 75 | CGContextStrokePath(ctx); 76 | 77 | //set backing image 78 | self.contents = (id)UIGraphicsGetImageFromCurrentImageContext().CGImage; 79 | UIGraphicsEndImageContext(); 80 | } 81 | 82 | @end -------------------------------------------------------------------------------- /ClockFace2/ClockFace/ClockFace2-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | com.charcoaldesign.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /ClockFace2/ClockFace/ClockFace2-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #import 8 | 9 | #ifndef __IPHONE_5_0 10 | #warning "This project uses features only available in iOS SDK 5.0 and later." 11 | #endif 12 | 13 | #ifdef __OBJC__ 14 | #import 15 | #import 16 | #endif 17 | -------------------------------------------------------------------------------- /ClockFace2/ClockFace/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ClockFace2/ClockFace/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ClockFace2/ClockFace/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // ClockFace 4 | // 5 | // Created by Nick Lockwood on 28/04/2014. 6 | // Copyright (c) 2014 Charcoal Design. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /ClockFace2/ClockFace/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // ClockFace 4 | // 5 | // Created by Nick Lockwood on 28/04/2014. 6 | // Copyright (c) 2014 Charcoal Design. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import "ClockFace.h" 11 | 12 | 13 | @interface ViewController () 14 | 15 | @property (nonatomic, strong) ClockFace *clockFace; 16 | 17 | @end 18 | 19 | 20 | @implementation ViewController 21 | 22 | - (void)viewDidLoad 23 | { 24 | [super viewDidLoad]; 25 | 26 | //add clock face layer 27 | self.clockFace = [[ClockFace alloc] init]; 28 | self.clockFace.position = CGPointMake(self.view.bounds.size.width / 2, 150); 29 | [self.view.layer addSublayer:self.clockFace]; 30 | } 31 | 32 | - (BOOL)textFieldShouldReturn:(UITextField *)textField 33 | { 34 | [textField resignFirstResponder]; 35 | return YES; 36 | } 37 | 38 | - (void)textFieldDidEndEditing:(UITextField *)textField 39 | { 40 | self.clockFace.time = [textField.text floatValue]; 41 | } 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /ClockFace2/ClockFace/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /ClockFace2/ClockFace/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // ClockFace 4 | // 5 | // Created by Nick Lockwood on 28/04/2014. 6 | // Copyright (c) 2014 Charcoal Design. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "AppDelegate.h" 12 | 13 | int main(int argc, char * argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /ClockFace2/ClockFace2.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 017AF7C2190E833100AA6D9D /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 017AF7C1190E833100AA6D9D /* Foundation.framework */; }; 11 | 017AF7C4190E833100AA6D9D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 017AF7C3190E833100AA6D9D /* CoreGraphics.framework */; }; 12 | 017AF7C6190E833100AA6D9D /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 017AF7C5190E833100AA6D9D /* UIKit.framework */; }; 13 | 017AF7CC190E833100AA6D9D /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 017AF7CA190E833100AA6D9D /* InfoPlist.strings */; }; 14 | 017AF7CE190E833100AA6D9D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 017AF7CD190E833100AA6D9D /* main.m */; }; 15 | 017AF7D2190E833100AA6D9D /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 017AF7D1190E833100AA6D9D /* AppDelegate.m */; }; 16 | 017AF7D5190E833100AA6D9D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 017AF7D3190E833100AA6D9D /* Main.storyboard */; }; 17 | 017AF7D8190E833100AA6D9D /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 017AF7D7190E833100AA6D9D /* ViewController.m */; }; 18 | 017AF7DA190E833100AA6D9D /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 017AF7D9190E833100AA6D9D /* Images.xcassets */; }; 19 | 017AF7F8190E835100AA6D9D /* ClockFace.m in Sources */ = {isa = PBXBuildFile; fileRef = 017AF7F7190E835100AA6D9D /* ClockFace.m */; }; 20 | /* End PBXBuildFile section */ 21 | 22 | /* Begin PBXFileReference section */ 23 | 017AF7BE190E833100AA6D9D /* ClockFace2.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ClockFace2.app; sourceTree = BUILT_PRODUCTS_DIR; }; 24 | 017AF7C1190E833100AA6D9D /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 25 | 017AF7C3190E833100AA6D9D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 26 | 017AF7C5190E833100AA6D9D /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 27 | 017AF7C9190E833100AA6D9D /* ClockFace2-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "ClockFace2-Info.plist"; sourceTree = ""; }; 28 | 017AF7CB190E833100AA6D9D /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 29 | 017AF7CD190E833100AA6D9D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 30 | 017AF7CF190E833100AA6D9D /* ClockFace2-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "ClockFace2-Prefix.pch"; sourceTree = ""; }; 31 | 017AF7D0190E833100AA6D9D /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 32 | 017AF7D1190E833100AA6D9D /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 33 | 017AF7D4190E833100AA6D9D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 34 | 017AF7D6190E833100AA6D9D /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 35 | 017AF7D7190E833100AA6D9D /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 36 | 017AF7D9190E833100AA6D9D /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 37 | 017AF7E0190E833100AA6D9D /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; 38 | 017AF7F6190E835100AA6D9D /* ClockFace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ClockFace.h; sourceTree = ""; }; 39 | 017AF7F7190E835100AA6D9D /* ClockFace.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ClockFace.m; sourceTree = ""; }; 40 | /* End PBXFileReference section */ 41 | 42 | /* Begin PBXFrameworksBuildPhase section */ 43 | 017AF7BB190E833100AA6D9D /* Frameworks */ = { 44 | isa = PBXFrameworksBuildPhase; 45 | buildActionMask = 2147483647; 46 | files = ( 47 | 017AF7C4190E833100AA6D9D /* CoreGraphics.framework in Frameworks */, 48 | 017AF7C6190E833100AA6D9D /* UIKit.framework in Frameworks */, 49 | 017AF7C2190E833100AA6D9D /* Foundation.framework in Frameworks */, 50 | ); 51 | runOnlyForDeploymentPostprocessing = 0; 52 | }; 53 | /* End PBXFrameworksBuildPhase section */ 54 | 55 | /* Begin PBXGroup section */ 56 | 017AF7B5190E833100AA6D9D = { 57 | isa = PBXGroup; 58 | children = ( 59 | 017AF7C7190E833100AA6D9D /* ClockFace */, 60 | 017AF7C0190E833100AA6D9D /* Frameworks */, 61 | 017AF7BF190E833100AA6D9D /* Products */, 62 | ); 63 | sourceTree = ""; 64 | }; 65 | 017AF7BF190E833100AA6D9D /* Products */ = { 66 | isa = PBXGroup; 67 | children = ( 68 | 017AF7BE190E833100AA6D9D /* ClockFace2.app */, 69 | ); 70 | name = Products; 71 | sourceTree = ""; 72 | }; 73 | 017AF7C0190E833100AA6D9D /* Frameworks */ = { 74 | isa = PBXGroup; 75 | children = ( 76 | 017AF7C1190E833100AA6D9D /* Foundation.framework */, 77 | 017AF7C3190E833100AA6D9D /* CoreGraphics.framework */, 78 | 017AF7C5190E833100AA6D9D /* UIKit.framework */, 79 | 017AF7E0190E833100AA6D9D /* XCTest.framework */, 80 | ); 81 | name = Frameworks; 82 | sourceTree = ""; 83 | }; 84 | 017AF7C7190E833100AA6D9D /* ClockFace */ = { 85 | isa = PBXGroup; 86 | children = ( 87 | 017AF7D0190E833100AA6D9D /* AppDelegate.h */, 88 | 017AF7D1190E833100AA6D9D /* AppDelegate.m */, 89 | 017AF7D3190E833100AA6D9D /* Main.storyboard */, 90 | 017AF7F6190E835100AA6D9D /* ClockFace.h */, 91 | 017AF7F7190E835100AA6D9D /* ClockFace.m */, 92 | 017AF7D6190E833100AA6D9D /* ViewController.h */, 93 | 017AF7D7190E833100AA6D9D /* ViewController.m */, 94 | 017AF7D9190E833100AA6D9D /* Images.xcassets */, 95 | 017AF7C8190E833100AA6D9D /* Supporting Files */, 96 | ); 97 | path = ClockFace; 98 | sourceTree = ""; 99 | }; 100 | 017AF7C8190E833100AA6D9D /* Supporting Files */ = { 101 | isa = PBXGroup; 102 | children = ( 103 | 017AF7C9190E833100AA6D9D /* ClockFace2-Info.plist */, 104 | 017AF7CA190E833100AA6D9D /* InfoPlist.strings */, 105 | 017AF7CD190E833100AA6D9D /* main.m */, 106 | 017AF7CF190E833100AA6D9D /* ClockFace2-Prefix.pch */, 107 | ); 108 | name = "Supporting Files"; 109 | sourceTree = ""; 110 | }; 111 | /* End PBXGroup section */ 112 | 113 | /* Begin PBXNativeTarget section */ 114 | 017AF7BD190E833100AA6D9D /* ClockFace2 */ = { 115 | isa = PBXNativeTarget; 116 | buildConfigurationList = 017AF7F0190E833100AA6D9D /* Build configuration list for PBXNativeTarget "ClockFace2" */; 117 | buildPhases = ( 118 | 017AF7BA190E833100AA6D9D /* Sources */, 119 | 017AF7BB190E833100AA6D9D /* Frameworks */, 120 | 017AF7BC190E833100AA6D9D /* Resources */, 121 | ); 122 | buildRules = ( 123 | ); 124 | dependencies = ( 125 | ); 126 | name = ClockFace2; 127 | productName = ClockFace; 128 | productReference = 017AF7BE190E833100AA6D9D /* ClockFace2.app */; 129 | productType = "com.apple.product-type.application"; 130 | }; 131 | /* End PBXNativeTarget section */ 132 | 133 | /* Begin PBXProject section */ 134 | 017AF7B6190E833100AA6D9D /* Project object */ = { 135 | isa = PBXProject; 136 | attributes = { 137 | LastUpgradeCheck = 0510; 138 | ORGANIZATIONNAME = "Charcoal Design"; 139 | }; 140 | buildConfigurationList = 017AF7B9190E833100AA6D9D /* Build configuration list for PBXProject "ClockFace2" */; 141 | compatibilityVersion = "Xcode 3.2"; 142 | developmentRegion = English; 143 | hasScannedForEncodings = 0; 144 | knownRegions = ( 145 | en, 146 | Base, 147 | ); 148 | mainGroup = 017AF7B5190E833100AA6D9D; 149 | productRefGroup = 017AF7BF190E833100AA6D9D /* Products */; 150 | projectDirPath = ""; 151 | projectRoot = ""; 152 | targets = ( 153 | 017AF7BD190E833100AA6D9D /* ClockFace2 */, 154 | ); 155 | }; 156 | /* End PBXProject section */ 157 | 158 | /* Begin PBXResourcesBuildPhase section */ 159 | 017AF7BC190E833100AA6D9D /* Resources */ = { 160 | isa = PBXResourcesBuildPhase; 161 | buildActionMask = 2147483647; 162 | files = ( 163 | 017AF7DA190E833100AA6D9D /* Images.xcassets in Resources */, 164 | 017AF7CC190E833100AA6D9D /* InfoPlist.strings in Resources */, 165 | 017AF7D5190E833100AA6D9D /* Main.storyboard in Resources */, 166 | ); 167 | runOnlyForDeploymentPostprocessing = 0; 168 | }; 169 | /* End PBXResourcesBuildPhase section */ 170 | 171 | /* Begin PBXSourcesBuildPhase section */ 172 | 017AF7BA190E833100AA6D9D /* Sources */ = { 173 | isa = PBXSourcesBuildPhase; 174 | buildActionMask = 2147483647; 175 | files = ( 176 | 017AF7D8190E833100AA6D9D /* ViewController.m in Sources */, 177 | 017AF7F8190E835100AA6D9D /* ClockFace.m in Sources */, 178 | 017AF7D2190E833100AA6D9D /* AppDelegate.m in Sources */, 179 | 017AF7CE190E833100AA6D9D /* main.m in Sources */, 180 | ); 181 | runOnlyForDeploymentPostprocessing = 0; 182 | }; 183 | /* End PBXSourcesBuildPhase section */ 184 | 185 | /* Begin PBXVariantGroup section */ 186 | 017AF7CA190E833100AA6D9D /* InfoPlist.strings */ = { 187 | isa = PBXVariantGroup; 188 | children = ( 189 | 017AF7CB190E833100AA6D9D /* en */, 190 | ); 191 | name = InfoPlist.strings; 192 | sourceTree = ""; 193 | }; 194 | 017AF7D3190E833100AA6D9D /* Main.storyboard */ = { 195 | isa = PBXVariantGroup; 196 | children = ( 197 | 017AF7D4190E833100AA6D9D /* Base */, 198 | ); 199 | name = Main.storyboard; 200 | sourceTree = ""; 201 | }; 202 | /* End PBXVariantGroup section */ 203 | 204 | /* Begin XCBuildConfiguration section */ 205 | 017AF7EE190E833100AA6D9D /* Debug */ = { 206 | isa = XCBuildConfiguration; 207 | buildSettings = { 208 | ALWAYS_SEARCH_USER_PATHS = NO; 209 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 210 | CLANG_CXX_LIBRARY = "libc++"; 211 | CLANG_ENABLE_MODULES = YES; 212 | CLANG_ENABLE_OBJC_ARC = YES; 213 | CLANG_WARN_BOOL_CONVERSION = YES; 214 | CLANG_WARN_CONSTANT_CONVERSION = YES; 215 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 216 | CLANG_WARN_EMPTY_BODY = YES; 217 | CLANG_WARN_ENUM_CONVERSION = YES; 218 | CLANG_WARN_INT_CONVERSION = YES; 219 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 220 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 221 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 222 | COPY_PHASE_STRIP = NO; 223 | GCC_C_LANGUAGE_STANDARD = gnu99; 224 | GCC_DYNAMIC_NO_PIC = NO; 225 | GCC_OPTIMIZATION_LEVEL = 0; 226 | GCC_PREPROCESSOR_DEFINITIONS = ( 227 | "DEBUG=1", 228 | "$(inherited)", 229 | ); 230 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 231 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 232 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 233 | GCC_WARN_UNDECLARED_SELECTOR = YES; 234 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 235 | GCC_WARN_UNUSED_FUNCTION = YES; 236 | GCC_WARN_UNUSED_VARIABLE = YES; 237 | IPHONEOS_DEPLOYMENT_TARGET = 6.1; 238 | ONLY_ACTIVE_ARCH = YES; 239 | SDKROOT = iphoneos; 240 | }; 241 | name = Debug; 242 | }; 243 | 017AF7EF190E833100AA6D9D /* Release */ = { 244 | isa = XCBuildConfiguration; 245 | buildSettings = { 246 | ALWAYS_SEARCH_USER_PATHS = NO; 247 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 248 | CLANG_CXX_LIBRARY = "libc++"; 249 | CLANG_ENABLE_MODULES = YES; 250 | CLANG_ENABLE_OBJC_ARC = YES; 251 | CLANG_WARN_BOOL_CONVERSION = YES; 252 | CLANG_WARN_CONSTANT_CONVERSION = YES; 253 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 254 | CLANG_WARN_EMPTY_BODY = YES; 255 | CLANG_WARN_ENUM_CONVERSION = YES; 256 | CLANG_WARN_INT_CONVERSION = YES; 257 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 258 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 259 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 260 | COPY_PHASE_STRIP = YES; 261 | ENABLE_NS_ASSERTIONS = NO; 262 | GCC_C_LANGUAGE_STANDARD = gnu99; 263 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 264 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 265 | GCC_WARN_UNDECLARED_SELECTOR = YES; 266 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 267 | GCC_WARN_UNUSED_FUNCTION = YES; 268 | GCC_WARN_UNUSED_VARIABLE = YES; 269 | IPHONEOS_DEPLOYMENT_TARGET = 6.1; 270 | SDKROOT = iphoneos; 271 | VALIDATE_PRODUCT = YES; 272 | }; 273 | name = Release; 274 | }; 275 | 017AF7F1190E833100AA6D9D /* Debug */ = { 276 | isa = XCBuildConfiguration; 277 | buildSettings = { 278 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 279 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 280 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 281 | GCC_PREFIX_HEADER = "ClockFace/ClockFace2-Prefix.pch"; 282 | INFOPLIST_FILE = "ClockFace/ClockFace2-Info.plist"; 283 | PRODUCT_NAME = ClockFace2; 284 | WRAPPER_EXTENSION = app; 285 | }; 286 | name = Debug; 287 | }; 288 | 017AF7F2190E833100AA6D9D /* Release */ = { 289 | isa = XCBuildConfiguration; 290 | buildSettings = { 291 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 292 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 293 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 294 | GCC_PREFIX_HEADER = "ClockFace/ClockFace2-Prefix.pch"; 295 | INFOPLIST_FILE = "ClockFace/ClockFace2-Info.plist"; 296 | PRODUCT_NAME = ClockFace2; 297 | WRAPPER_EXTENSION = app; 298 | }; 299 | name = Release; 300 | }; 301 | /* End XCBuildConfiguration section */ 302 | 303 | /* Begin XCConfigurationList section */ 304 | 017AF7B9190E833100AA6D9D /* Build configuration list for PBXProject "ClockFace2" */ = { 305 | isa = XCConfigurationList; 306 | buildConfigurations = ( 307 | 017AF7EE190E833100AA6D9D /* Debug */, 308 | 017AF7EF190E833100AA6D9D /* Release */, 309 | ); 310 | defaultConfigurationIsVisible = 0; 311 | defaultConfigurationName = Release; 312 | }; 313 | 017AF7F0190E833100AA6D9D /* Build configuration list for PBXNativeTarget "ClockFace2" */ = { 314 | isa = XCConfigurationList; 315 | buildConfigurations = ( 316 | 017AF7F1190E833100AA6D9D /* Debug */, 317 | 017AF7F2190E833100AA6D9D /* Release */, 318 | ); 319 | defaultConfigurationIsVisible = 0; 320 | defaultConfigurationName = Release; 321 | }; 322 | /* End XCConfigurationList section */ 323 | }; 324 | rootObject = 017AF7B6190E833100AA6D9D /* Project object */; 325 | } 326 | --------------------------------------------------------------------------------