├── Assets ├── icon.png └── icon@2x.png ├── Core Image iOS ├── CircleSplash.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ ├── xcshareddata │ │ │ └── CircleSplash.xccheckout │ │ └── xcuserdata │ │ │ └── brimelow.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcuserdata │ │ └── brimelow.xcuserdatad │ │ ├── xcdebugger │ │ └── Breakpoints_v2.xcbkptlist │ │ └── xcschemes │ │ ├── CircleSplash.xcscheme │ │ └── xcschememanagement.plist ├── CircleSplash │ ├── AppDelegate.swift │ ├── Base.lproj │ │ ├── LaunchScreen.xib │ │ └── Main.storyboard │ ├── Images.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Info.plist │ ├── ViewController.swift │ └── willis.jpg └── CircleSplashTests │ ├── CircleSplashTests.swift │ └── Info.plist ├── Creating Class Extensions ├── Giants.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcuserdata │ │ │ └── brimelow.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcuserdata │ │ └── brimelow.xcuserdatad │ │ └── xcschemes │ │ ├── Giants.xcscheme │ │ └── xcschememanagement.plist ├── Giants │ ├── AppDelegate.swift │ ├── Base.lproj │ │ └── Main.storyboard │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── LaunchImage.launchimage │ │ │ └── Contents.json │ ├── Info.plist │ ├── UIImage+Cropping.swift │ ├── ViewController.swift │ ├── giants.png │ └── pence.png └── GiantsTests │ ├── GiantsTests.swift │ └── Info.plist ├── Five Must Know Features ├── Arrays.playground │ ├── contents.xcplayground │ ├── section-1.swift │ └── timeline.xctimeline ├── ComputedProps.playground │ ├── contents.xcplayground │ ├── section-1.swift │ └── timeline.xctimeline ├── Enums.playground │ ├── contents.xcplayground │ ├── section-1.swift │ └── timeline.xctimeline └── Tuples.playground │ ├── contents.xcplayground │ ├── section-1.swift │ └── timeline.xctimeline ├── Menubar App ├── MenubarApp.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ ├── xcshareddata │ │ │ └── MenubarApp.xccheckout │ │ └── xcuserdata │ │ │ └── brimelow.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcuserdata │ │ └── brimelow.xcuserdatad │ │ ├── xcdebugger │ │ └── Breakpoints_v2.xcbkptlist │ │ └── xcschemes │ │ ├── MenubarApp.xcscheme │ │ └── xcschememanagement.plist ├── MenubarApp │ ├── AppDelegate.swift │ ├── Base.lproj │ │ └── MainMenu.xib │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── statusIcon.imageset │ │ │ ├── Contents.json │ │ │ ├── icon.png │ │ │ └── icon@2x.png │ ├── Info.plist │ ├── icon.png │ └── icon@2x.png └── MenubarAppTests │ ├── Info.plist │ └── MenubarAppTests.swift ├── Optionals ├── Optionals.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ ├── xcshareddata │ │ │ └── Optionals.xccheckout │ │ └── xcuserdata │ │ │ └── brimelow.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcuserdata │ │ └── brimelow.xcuserdatad │ │ └── xcschemes │ │ ├── Optionals.xcscheme │ │ └── xcschememanagement.plist ├── Optionals │ ├── AppDelegate.swift │ ├── Base.lproj │ │ ├── LaunchScreen.xib │ │ └── Main.storyboard │ ├── Images.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Info.plist │ └── ViewController.swift └── OptionalsTests │ ├── Info.plist │ └── OptionalsTests.swift └── README.md /Assets/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brimelow/Swift-Video-Tutorials/0b65a3f79a2ac4745aea5f113046ec88adda87e0/Assets/icon.png -------------------------------------------------------------------------------- /Assets/icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brimelow/Swift-Video-Tutorials/0b65a3f79a2ac4745aea5f113046ec88adda87e0/Assets/icon@2x.png -------------------------------------------------------------------------------- /Core Image iOS/CircleSplash.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 6097B78619FA228800366652 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6097B78519FA228800366652 /* AppDelegate.swift */; }; 11 | 6097B78819FA228800366652 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6097B78719FA228800366652 /* ViewController.swift */; }; 12 | 6097B78B19FA228800366652 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6097B78919FA228800366652 /* Main.storyboard */; }; 13 | 6097B78D19FA228800366652 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6097B78C19FA228800366652 /* Images.xcassets */; }; 14 | 6097B79019FA228800366652 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6097B78E19FA228800366652 /* LaunchScreen.xib */; }; 15 | 6097B79C19FA228800366652 /* CircleSplashTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6097B79B19FA228800366652 /* CircleSplashTests.swift */; }; 16 | 6097B7A619FA22B100366652 /* willis.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 6097B7A519FA22B100366652 /* willis.jpg */; }; 17 | /* End PBXBuildFile section */ 18 | 19 | /* Begin PBXContainerItemProxy section */ 20 | 6097B79619FA228800366652 /* PBXContainerItemProxy */ = { 21 | isa = PBXContainerItemProxy; 22 | containerPortal = 6097B77819FA228800366652 /* Project object */; 23 | proxyType = 1; 24 | remoteGlobalIDString = 6097B77F19FA228800366652; 25 | remoteInfo = CircleSplash; 26 | }; 27 | /* End PBXContainerItemProxy section */ 28 | 29 | /* Begin PBXFileReference section */ 30 | 6097B78019FA228800366652 /* CircleSplash.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CircleSplash.app; sourceTree = BUILT_PRODUCTS_DIR; }; 31 | 6097B78419FA228800366652 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 32 | 6097B78519FA228800366652 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 33 | 6097B78719FA228800366652 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 34 | 6097B78A19FA228800366652 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 35 | 6097B78C19FA228800366652 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 36 | 6097B78F19FA228800366652 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 37 | 6097B79519FA228800366652 /* CircleSplashTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CircleSplashTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 38 | 6097B79A19FA228800366652 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 39 | 6097B79B19FA228800366652 /* CircleSplashTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CircleSplashTests.swift; sourceTree = ""; }; 40 | 6097B7A519FA22B100366652 /* willis.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = willis.jpg; sourceTree = ""; }; 41 | /* End PBXFileReference section */ 42 | 43 | /* Begin PBXFrameworksBuildPhase section */ 44 | 6097B77D19FA228800366652 /* Frameworks */ = { 45 | isa = PBXFrameworksBuildPhase; 46 | buildActionMask = 2147483647; 47 | files = ( 48 | ); 49 | runOnlyForDeploymentPostprocessing = 0; 50 | }; 51 | 6097B79219FA228800366652 /* Frameworks */ = { 52 | isa = PBXFrameworksBuildPhase; 53 | buildActionMask = 2147483647; 54 | files = ( 55 | ); 56 | runOnlyForDeploymentPostprocessing = 0; 57 | }; 58 | /* End PBXFrameworksBuildPhase section */ 59 | 60 | /* Begin PBXGroup section */ 61 | 6097B77719FA228800366652 = { 62 | isa = PBXGroup; 63 | children = ( 64 | 6097B78219FA228800366652 /* CircleSplash */, 65 | 6097B79819FA228800366652 /* CircleSplashTests */, 66 | 6097B78119FA228800366652 /* Products */, 67 | ); 68 | sourceTree = ""; 69 | }; 70 | 6097B78119FA228800366652 /* Products */ = { 71 | isa = PBXGroup; 72 | children = ( 73 | 6097B78019FA228800366652 /* CircleSplash.app */, 74 | 6097B79519FA228800366652 /* CircleSplashTests.xctest */, 75 | ); 76 | name = Products; 77 | sourceTree = ""; 78 | }; 79 | 6097B78219FA228800366652 /* CircleSplash */ = { 80 | isa = PBXGroup; 81 | children = ( 82 | 6097B78519FA228800366652 /* AppDelegate.swift */, 83 | 6097B78719FA228800366652 /* ViewController.swift */, 84 | 6097B78919FA228800366652 /* Main.storyboard */, 85 | 6097B78C19FA228800366652 /* Images.xcassets */, 86 | 6097B7A519FA22B100366652 /* willis.jpg */, 87 | 6097B78E19FA228800366652 /* LaunchScreen.xib */, 88 | 6097B78319FA228800366652 /* Supporting Files */, 89 | ); 90 | path = CircleSplash; 91 | sourceTree = ""; 92 | }; 93 | 6097B78319FA228800366652 /* Supporting Files */ = { 94 | isa = PBXGroup; 95 | children = ( 96 | 6097B78419FA228800366652 /* Info.plist */, 97 | ); 98 | name = "Supporting Files"; 99 | sourceTree = ""; 100 | }; 101 | 6097B79819FA228800366652 /* CircleSplashTests */ = { 102 | isa = PBXGroup; 103 | children = ( 104 | 6097B79B19FA228800366652 /* CircleSplashTests.swift */, 105 | 6097B79919FA228800366652 /* Supporting Files */, 106 | ); 107 | path = CircleSplashTests; 108 | sourceTree = ""; 109 | }; 110 | 6097B79919FA228800366652 /* Supporting Files */ = { 111 | isa = PBXGroup; 112 | children = ( 113 | 6097B79A19FA228800366652 /* Info.plist */, 114 | ); 115 | name = "Supporting Files"; 116 | sourceTree = ""; 117 | }; 118 | /* End PBXGroup section */ 119 | 120 | /* Begin PBXNativeTarget section */ 121 | 6097B77F19FA228800366652 /* CircleSplash */ = { 122 | isa = PBXNativeTarget; 123 | buildConfigurationList = 6097B79F19FA228800366652 /* Build configuration list for PBXNativeTarget "CircleSplash" */; 124 | buildPhases = ( 125 | 6097B77C19FA228800366652 /* Sources */, 126 | 6097B77D19FA228800366652 /* Frameworks */, 127 | 6097B77E19FA228800366652 /* Resources */, 128 | ); 129 | buildRules = ( 130 | ); 131 | dependencies = ( 132 | ); 133 | name = CircleSplash; 134 | productName = CircleSplash; 135 | productReference = 6097B78019FA228800366652 /* CircleSplash.app */; 136 | productType = "com.apple.product-type.application"; 137 | }; 138 | 6097B79419FA228800366652 /* CircleSplashTests */ = { 139 | isa = PBXNativeTarget; 140 | buildConfigurationList = 6097B7A219FA228800366652 /* Build configuration list for PBXNativeTarget "CircleSplashTests" */; 141 | buildPhases = ( 142 | 6097B79119FA228800366652 /* Sources */, 143 | 6097B79219FA228800366652 /* Frameworks */, 144 | 6097B79319FA228800366652 /* Resources */, 145 | ); 146 | buildRules = ( 147 | ); 148 | dependencies = ( 149 | 6097B79719FA228800366652 /* PBXTargetDependency */, 150 | ); 151 | name = CircleSplashTests; 152 | productName = CircleSplashTests; 153 | productReference = 6097B79519FA228800366652 /* CircleSplashTests.xctest */; 154 | productType = "com.apple.product-type.bundle.unit-test"; 155 | }; 156 | /* End PBXNativeTarget section */ 157 | 158 | /* Begin PBXProject section */ 159 | 6097B77819FA228800366652 /* Project object */ = { 160 | isa = PBXProject; 161 | attributes = { 162 | LastUpgradeCheck = 0610; 163 | ORGANIZATIONNAME = "Lee Brimelow"; 164 | TargetAttributes = { 165 | 6097B77F19FA228800366652 = { 166 | CreatedOnToolsVersion = 6.1; 167 | }; 168 | 6097B79419FA228800366652 = { 169 | CreatedOnToolsVersion = 6.1; 170 | TestTargetID = 6097B77F19FA228800366652; 171 | }; 172 | }; 173 | }; 174 | buildConfigurationList = 6097B77B19FA228800366652 /* Build configuration list for PBXProject "CircleSplash" */; 175 | compatibilityVersion = "Xcode 3.2"; 176 | developmentRegion = English; 177 | hasScannedForEncodings = 0; 178 | knownRegions = ( 179 | en, 180 | Base, 181 | ); 182 | mainGroup = 6097B77719FA228800366652; 183 | productRefGroup = 6097B78119FA228800366652 /* Products */; 184 | projectDirPath = ""; 185 | projectRoot = ""; 186 | targets = ( 187 | 6097B77F19FA228800366652 /* CircleSplash */, 188 | 6097B79419FA228800366652 /* CircleSplashTests */, 189 | ); 190 | }; 191 | /* End PBXProject section */ 192 | 193 | /* Begin PBXResourcesBuildPhase section */ 194 | 6097B77E19FA228800366652 /* Resources */ = { 195 | isa = PBXResourcesBuildPhase; 196 | buildActionMask = 2147483647; 197 | files = ( 198 | 6097B78B19FA228800366652 /* Main.storyboard in Resources */, 199 | 6097B7A619FA22B100366652 /* willis.jpg in Resources */, 200 | 6097B79019FA228800366652 /* LaunchScreen.xib in Resources */, 201 | 6097B78D19FA228800366652 /* Images.xcassets in Resources */, 202 | ); 203 | runOnlyForDeploymentPostprocessing = 0; 204 | }; 205 | 6097B79319FA228800366652 /* Resources */ = { 206 | isa = PBXResourcesBuildPhase; 207 | buildActionMask = 2147483647; 208 | files = ( 209 | ); 210 | runOnlyForDeploymentPostprocessing = 0; 211 | }; 212 | /* End PBXResourcesBuildPhase section */ 213 | 214 | /* Begin PBXSourcesBuildPhase section */ 215 | 6097B77C19FA228800366652 /* Sources */ = { 216 | isa = PBXSourcesBuildPhase; 217 | buildActionMask = 2147483647; 218 | files = ( 219 | 6097B78819FA228800366652 /* ViewController.swift in Sources */, 220 | 6097B78619FA228800366652 /* AppDelegate.swift in Sources */, 221 | ); 222 | runOnlyForDeploymentPostprocessing = 0; 223 | }; 224 | 6097B79119FA228800366652 /* Sources */ = { 225 | isa = PBXSourcesBuildPhase; 226 | buildActionMask = 2147483647; 227 | files = ( 228 | 6097B79C19FA228800366652 /* CircleSplashTests.swift in Sources */, 229 | ); 230 | runOnlyForDeploymentPostprocessing = 0; 231 | }; 232 | /* End PBXSourcesBuildPhase section */ 233 | 234 | /* Begin PBXTargetDependency section */ 235 | 6097B79719FA228800366652 /* PBXTargetDependency */ = { 236 | isa = PBXTargetDependency; 237 | target = 6097B77F19FA228800366652 /* CircleSplash */; 238 | targetProxy = 6097B79619FA228800366652 /* PBXContainerItemProxy */; 239 | }; 240 | /* End PBXTargetDependency section */ 241 | 242 | /* Begin PBXVariantGroup section */ 243 | 6097B78919FA228800366652 /* Main.storyboard */ = { 244 | isa = PBXVariantGroup; 245 | children = ( 246 | 6097B78A19FA228800366652 /* Base */, 247 | ); 248 | name = Main.storyboard; 249 | sourceTree = ""; 250 | }; 251 | 6097B78E19FA228800366652 /* LaunchScreen.xib */ = { 252 | isa = PBXVariantGroup; 253 | children = ( 254 | 6097B78F19FA228800366652 /* Base */, 255 | ); 256 | name = LaunchScreen.xib; 257 | sourceTree = ""; 258 | }; 259 | /* End PBXVariantGroup section */ 260 | 261 | /* Begin XCBuildConfiguration section */ 262 | 6097B79D19FA228800366652 /* Debug */ = { 263 | isa = XCBuildConfiguration; 264 | buildSettings = { 265 | ALWAYS_SEARCH_USER_PATHS = NO; 266 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 267 | CLANG_CXX_LIBRARY = "libc++"; 268 | CLANG_ENABLE_MODULES = YES; 269 | CLANG_ENABLE_OBJC_ARC = YES; 270 | CLANG_WARN_BOOL_CONVERSION = YES; 271 | CLANG_WARN_CONSTANT_CONVERSION = YES; 272 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 273 | CLANG_WARN_EMPTY_BODY = YES; 274 | CLANG_WARN_ENUM_CONVERSION = YES; 275 | CLANG_WARN_INT_CONVERSION = YES; 276 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 277 | CLANG_WARN_UNREACHABLE_CODE = YES; 278 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 279 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 280 | COPY_PHASE_STRIP = NO; 281 | ENABLE_STRICT_OBJC_MSGSEND = YES; 282 | GCC_C_LANGUAGE_STANDARD = gnu99; 283 | GCC_DYNAMIC_NO_PIC = NO; 284 | GCC_OPTIMIZATION_LEVEL = 0; 285 | GCC_PREPROCESSOR_DEFINITIONS = ( 286 | "DEBUG=1", 287 | "$(inherited)", 288 | ); 289 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 290 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 291 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 292 | GCC_WARN_UNDECLARED_SELECTOR = YES; 293 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 294 | GCC_WARN_UNUSED_FUNCTION = YES; 295 | GCC_WARN_UNUSED_VARIABLE = YES; 296 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 297 | MTL_ENABLE_DEBUG_INFO = YES; 298 | ONLY_ACTIVE_ARCH = YES; 299 | SDKROOT = iphoneos; 300 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 301 | TARGETED_DEVICE_FAMILY = "1,2"; 302 | }; 303 | name = Debug; 304 | }; 305 | 6097B79E19FA228800366652 /* Release */ = { 306 | isa = XCBuildConfiguration; 307 | buildSettings = { 308 | ALWAYS_SEARCH_USER_PATHS = NO; 309 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 310 | CLANG_CXX_LIBRARY = "libc++"; 311 | CLANG_ENABLE_MODULES = YES; 312 | CLANG_ENABLE_OBJC_ARC = YES; 313 | CLANG_WARN_BOOL_CONVERSION = YES; 314 | CLANG_WARN_CONSTANT_CONVERSION = YES; 315 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 316 | CLANG_WARN_EMPTY_BODY = YES; 317 | CLANG_WARN_ENUM_CONVERSION = YES; 318 | CLANG_WARN_INT_CONVERSION = YES; 319 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 320 | CLANG_WARN_UNREACHABLE_CODE = YES; 321 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 322 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 323 | COPY_PHASE_STRIP = YES; 324 | ENABLE_NS_ASSERTIONS = NO; 325 | ENABLE_STRICT_OBJC_MSGSEND = YES; 326 | GCC_C_LANGUAGE_STANDARD = gnu99; 327 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 328 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 329 | GCC_WARN_UNDECLARED_SELECTOR = YES; 330 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 331 | GCC_WARN_UNUSED_FUNCTION = YES; 332 | GCC_WARN_UNUSED_VARIABLE = YES; 333 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 334 | MTL_ENABLE_DEBUG_INFO = NO; 335 | SDKROOT = iphoneos; 336 | TARGETED_DEVICE_FAMILY = "1,2"; 337 | VALIDATE_PRODUCT = YES; 338 | }; 339 | name = Release; 340 | }; 341 | 6097B7A019FA228800366652 /* Debug */ = { 342 | isa = XCBuildConfiguration; 343 | buildSettings = { 344 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 345 | INFOPLIST_FILE = CircleSplash/Info.plist; 346 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 347 | PRODUCT_NAME = "$(TARGET_NAME)"; 348 | }; 349 | name = Debug; 350 | }; 351 | 6097B7A119FA228800366652 /* Release */ = { 352 | isa = XCBuildConfiguration; 353 | buildSettings = { 354 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 355 | INFOPLIST_FILE = CircleSplash/Info.plist; 356 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 357 | PRODUCT_NAME = "$(TARGET_NAME)"; 358 | }; 359 | name = Release; 360 | }; 361 | 6097B7A319FA228800366652 /* Debug */ = { 362 | isa = XCBuildConfiguration; 363 | buildSettings = { 364 | BUNDLE_LOADER = "$(TEST_HOST)"; 365 | FRAMEWORK_SEARCH_PATHS = ( 366 | "$(SDKROOT)/Developer/Library/Frameworks", 367 | "$(inherited)", 368 | ); 369 | GCC_PREPROCESSOR_DEFINITIONS = ( 370 | "DEBUG=1", 371 | "$(inherited)", 372 | ); 373 | INFOPLIST_FILE = CircleSplashTests/Info.plist; 374 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 375 | PRODUCT_NAME = "$(TARGET_NAME)"; 376 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/CircleSplash.app/CircleSplash"; 377 | }; 378 | name = Debug; 379 | }; 380 | 6097B7A419FA228800366652 /* Release */ = { 381 | isa = XCBuildConfiguration; 382 | buildSettings = { 383 | BUNDLE_LOADER = "$(TEST_HOST)"; 384 | FRAMEWORK_SEARCH_PATHS = ( 385 | "$(SDKROOT)/Developer/Library/Frameworks", 386 | "$(inherited)", 387 | ); 388 | INFOPLIST_FILE = CircleSplashTests/Info.plist; 389 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 390 | PRODUCT_NAME = "$(TARGET_NAME)"; 391 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/CircleSplash.app/CircleSplash"; 392 | }; 393 | name = Release; 394 | }; 395 | /* End XCBuildConfiguration section */ 396 | 397 | /* Begin XCConfigurationList section */ 398 | 6097B77B19FA228800366652 /* Build configuration list for PBXProject "CircleSplash" */ = { 399 | isa = XCConfigurationList; 400 | buildConfigurations = ( 401 | 6097B79D19FA228800366652 /* Debug */, 402 | 6097B79E19FA228800366652 /* Release */, 403 | ); 404 | defaultConfigurationIsVisible = 0; 405 | defaultConfigurationName = Release; 406 | }; 407 | 6097B79F19FA228800366652 /* Build configuration list for PBXNativeTarget "CircleSplash" */ = { 408 | isa = XCConfigurationList; 409 | buildConfigurations = ( 410 | 6097B7A019FA228800366652 /* Debug */, 411 | 6097B7A119FA228800366652 /* Release */, 412 | ); 413 | defaultConfigurationIsVisible = 0; 414 | }; 415 | 6097B7A219FA228800366652 /* Build configuration list for PBXNativeTarget "CircleSplashTests" */ = { 416 | isa = XCConfigurationList; 417 | buildConfigurations = ( 418 | 6097B7A319FA228800366652 /* Debug */, 419 | 6097B7A419FA228800366652 /* Release */, 420 | ); 421 | defaultConfigurationIsVisible = 0; 422 | }; 423 | /* End XCConfigurationList section */ 424 | }; 425 | rootObject = 6097B77819FA228800366652 /* Project object */; 426 | } 427 | -------------------------------------------------------------------------------- /Core Image iOS/CircleSplash.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Core Image iOS/CircleSplash.xcodeproj/project.xcworkspace/xcshareddata/CircleSplash.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | E07F0131-7ADD-497D-BF74-DE407741D280 9 | IDESourceControlProjectName 10 | CircleSplash 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | 366CA4AA6B486F114DE3688D25A5A3EA372929BE 14 | https://github.com/brimelow/Swift-Video-Tutorials.git 15 | 16 | IDESourceControlProjectPath 17 | CircleSplash/CircleSplash.xcodeproj 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | 366CA4AA6B486F114DE3688D25A5A3EA372929BE 21 | ../../.. 22 | 23 | IDESourceControlProjectURL 24 | https://github.com/brimelow/Swift-Video-Tutorials.git 25 | IDESourceControlProjectVersion 26 | 111 27 | IDESourceControlProjectWCCIdentifier 28 | 366CA4AA6B486F114DE3688D25A5A3EA372929BE 29 | IDESourceControlProjectWCConfigurations 30 | 31 | 32 | IDESourceControlRepositoryExtensionIdentifierKey 33 | public.vcs.git 34 | IDESourceControlWCCIdentifierKey 35 | 366CA4AA6B486F114DE3688D25A5A3EA372929BE 36 | IDESourceControlWCCName 37 | Swift%20Video%20Tutorials 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /Core Image iOS/CircleSplash.xcodeproj/project.xcworkspace/xcuserdata/brimelow.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brimelow/Swift-Video-Tutorials/0b65a3f79a2ac4745aea5f113046ec88adda87e0/Core Image iOS/CircleSplash.xcodeproj/project.xcworkspace/xcuserdata/brimelow.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /Core Image iOS/CircleSplash.xcodeproj/xcuserdata/brimelow.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /Core Image iOS/CircleSplash.xcodeproj/xcuserdata/brimelow.xcuserdatad/xcschemes/CircleSplash.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 47 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 65 | 66 | 75 | 76 | 82 | 83 | 84 | 85 | 86 | 87 | 93 | 94 | 100 | 101 | 102 | 103 | 105 | 106 | 109 | 110 | 111 | -------------------------------------------------------------------------------- /Core Image iOS/CircleSplash.xcodeproj/xcuserdata/brimelow.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | CircleSplash.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 6097B77F19FA228800366652 16 | 17 | primary 18 | 19 | 20 | 6097B79419FA228800366652 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Core Image iOS/CircleSplash/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // CircleSplash 4 | // 5 | // Created by Lee Brimelow on 10/23/14. 6 | // Copyright (c) 2014 Lee Brimelow. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(application: UIApplication) { 23 | // 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. 24 | // 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. 25 | } 26 | 27 | func applicationDidEnterBackground(application: UIApplication) { 28 | // 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. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(application: UIApplication) { 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 | func applicationDidBecomeActive(application: UIApplication) { 37 | // 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. 38 | } 39 | 40 | func applicationWillTerminate(application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /Core Image iOS/CircleSplash/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 20 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /Core Image iOS/CircleSplash/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 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /Core Image iOS/CircleSplash/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" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /Core Image iOS/CircleSplash/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | com.leebrimelow.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | UISupportedInterfaceOrientations~ipad 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationPortraitUpsideDown 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /Core Image iOS/CircleSplash/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // CircleSplash 4 | // 5 | // Created by Lee Brimelow on 10/23/14. 6 | // Copyright (c) 2014 Lee Brimelow. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ViewController: UIViewController { 12 | 13 | @IBOutlet var imageView: UIImageView! 14 | @IBOutlet var panGesture: UIPanGestureRecognizer! 15 | 16 | let filter = CIFilter(name: "CICircleSplashDistortion") 17 | let context = CIContext(options: nil) 18 | var extent: CGRect! 19 | var scaleFactor: CGFloat! 20 | 21 | override func viewDidLoad() { 22 | super.viewDidLoad() 23 | 24 | scaleFactor = UIScreen.mainScreen().scale 25 | extent = CGRectApplyAffineTransform(UIScreen.mainScreen().bounds, CGAffineTransformMakeScale(scaleFactor, scaleFactor)) 26 | 27 | let ciImage = CIImage(image: imageView.image) 28 | 29 | filter.setDefaults() 30 | filter.setValue(ciImage, forKey: kCIInputImageKey) 31 | 32 | imageView.image = UIImage(CGImage: context.createCGImage(filter.outputImage, fromRect: extent)) 33 | 34 | panGesture.addTarget(self, action: "panned:") 35 | } 36 | 37 | func panned(gesture: UIGestureRecognizer) { 38 | let location = gesture.locationInView(imageView) 39 | let x = location.x * scaleFactor 40 | let y = imageView.bounds.height * scaleFactor - location.y * scaleFactor 41 | 42 | filter.setValue(CIVector(x: x, y: y), forKey: kCIInputCenterKey) 43 | 44 | imageView.image = UIImage(CGImage: context.createCGImage(filter.outputImage, fromRect: extent)) 45 | } 46 | 47 | } 48 | 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /Core Image iOS/CircleSplash/willis.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brimelow/Swift-Video-Tutorials/0b65a3f79a2ac4745aea5f113046ec88adda87e0/Core Image iOS/CircleSplash/willis.jpg -------------------------------------------------------------------------------- /Core Image iOS/CircleSplashTests/CircleSplashTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CircleSplashTests.swift 3 | // CircleSplashTests 4 | // 5 | // Created by Lee Brimelow on 10/23/14. 6 | // Copyright (c) 2014 Lee Brimelow. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import XCTest 11 | 12 | class CircleSplashTests: XCTestCase { 13 | 14 | override func setUp() { 15 | super.setUp() 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | } 18 | 19 | override func tearDown() { 20 | // Put teardown code here. This method is called after the invocation of each test method in the class. 21 | super.tearDown() 22 | } 23 | 24 | func testExample() { 25 | // This is an example of a functional test case. 26 | XCTAssert(true, "Pass") 27 | } 28 | 29 | func testPerformanceExample() { 30 | // This is an example of a performance test case. 31 | self.measureBlock() { 32 | // Put the code you want to measure the time of here. 33 | } 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /Core Image iOS/CircleSplashTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | com.leebrimelow.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /Creating Class Extensions/Giants.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 609C39411948014F000BBBBE /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 609C39401948014F000BBBBE /* AppDelegate.swift */; }; 11 | 609C39431948014F000BBBBE /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 609C39421948014F000BBBBE /* ViewController.swift */; }; 12 | 609C39461948014F000BBBBE /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 609C39441948014F000BBBBE /* Main.storyboard */; }; 13 | 609C39481948014F000BBBBE /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 609C39471948014F000BBBBE /* Images.xcassets */; }; 14 | 609C395419480150000BBBBE /* GiantsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 609C395319480150000BBBBE /* GiantsTests.swift */; }; 15 | 609C395F1948017C000BBBBE /* giants.png in Resources */ = {isa = PBXBuildFile; fileRef = 609C395D1948017C000BBBBE /* giants.png */; }; 16 | 609C39601948017C000BBBBE /* pence.png in Resources */ = {isa = PBXBuildFile; fileRef = 609C395E1948017C000BBBBE /* pence.png */; }; 17 | 609C3962194802B5000BBBBE /* UIImage+Cropping.swift in Sources */ = {isa = PBXBuildFile; fileRef = 609C3961194802B5000BBBBE /* UIImage+Cropping.swift */; }; 18 | /* End PBXBuildFile section */ 19 | 20 | /* Begin PBXContainerItemProxy section */ 21 | 609C394E19480150000BBBBE /* PBXContainerItemProxy */ = { 22 | isa = PBXContainerItemProxy; 23 | containerPortal = 609C39331948014F000BBBBE /* Project object */; 24 | proxyType = 1; 25 | remoteGlobalIDString = 609C393A1948014F000BBBBE; 26 | remoteInfo = Giants; 27 | }; 28 | /* End PBXContainerItemProxy section */ 29 | 30 | /* Begin PBXFileReference section */ 31 | 609C393B1948014F000BBBBE /* Giants.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Giants.app; sourceTree = BUILT_PRODUCTS_DIR; }; 32 | 609C393F1948014F000BBBBE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 33 | 609C39401948014F000BBBBE /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 34 | 609C39421948014F000BBBBE /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 35 | 609C39451948014F000BBBBE /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 36 | 609C39471948014F000BBBBE /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 37 | 609C394D19480150000BBBBE /* GiantsTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = GiantsTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 38 | 609C395219480150000BBBBE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 39 | 609C395319480150000BBBBE /* GiantsTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GiantsTests.swift; sourceTree = ""; }; 40 | 609C395D1948017C000BBBBE /* giants.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = giants.png; sourceTree = ""; }; 41 | 609C395E1948017C000BBBBE /* pence.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = pence.png; sourceTree = ""; }; 42 | 609C3961194802B5000BBBBE /* UIImage+Cropping.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIImage+Cropping.swift"; sourceTree = ""; }; 43 | /* End PBXFileReference section */ 44 | 45 | /* Begin PBXFrameworksBuildPhase section */ 46 | 609C39381948014F000BBBBE /* Frameworks */ = { 47 | isa = PBXFrameworksBuildPhase; 48 | buildActionMask = 2147483647; 49 | files = ( 50 | ); 51 | runOnlyForDeploymentPostprocessing = 0; 52 | }; 53 | 609C394A19480150000BBBBE /* Frameworks */ = { 54 | isa = PBXFrameworksBuildPhase; 55 | buildActionMask = 2147483647; 56 | files = ( 57 | ); 58 | runOnlyForDeploymentPostprocessing = 0; 59 | }; 60 | /* End PBXFrameworksBuildPhase section */ 61 | 62 | /* Begin PBXGroup section */ 63 | 609C39321948014F000BBBBE = { 64 | isa = PBXGroup; 65 | children = ( 66 | 609C393D1948014F000BBBBE /* Giants */, 67 | 609C395019480150000BBBBE /* GiantsTests */, 68 | 609C393C1948014F000BBBBE /* Products */, 69 | ); 70 | sourceTree = ""; 71 | }; 72 | 609C393C1948014F000BBBBE /* Products */ = { 73 | isa = PBXGroup; 74 | children = ( 75 | 609C393B1948014F000BBBBE /* Giants.app */, 76 | 609C394D19480150000BBBBE /* GiantsTests.xctest */, 77 | ); 78 | name = Products; 79 | sourceTree = ""; 80 | }; 81 | 609C393D1948014F000BBBBE /* Giants */ = { 82 | isa = PBXGroup; 83 | children = ( 84 | 609C39401948014F000BBBBE /* AppDelegate.swift */, 85 | 609C39421948014F000BBBBE /* ViewController.swift */, 86 | 609C39441948014F000BBBBE /* Main.storyboard */, 87 | 609C395D1948017C000BBBBE /* giants.png */, 88 | 609C395E1948017C000BBBBE /* pence.png */, 89 | 609C39471948014F000BBBBE /* Images.xcassets */, 90 | 609C393E1948014F000BBBBE /* Supporting Files */, 91 | 609C3961194802B5000BBBBE /* UIImage+Cropping.swift */, 92 | ); 93 | path = Giants; 94 | sourceTree = ""; 95 | }; 96 | 609C393E1948014F000BBBBE /* Supporting Files */ = { 97 | isa = PBXGroup; 98 | children = ( 99 | 609C393F1948014F000BBBBE /* Info.plist */, 100 | ); 101 | name = "Supporting Files"; 102 | sourceTree = ""; 103 | }; 104 | 609C395019480150000BBBBE /* GiantsTests */ = { 105 | isa = PBXGroup; 106 | children = ( 107 | 609C395319480150000BBBBE /* GiantsTests.swift */, 108 | 609C395119480150000BBBBE /* Supporting Files */, 109 | ); 110 | path = GiantsTests; 111 | sourceTree = ""; 112 | }; 113 | 609C395119480150000BBBBE /* Supporting Files */ = { 114 | isa = PBXGroup; 115 | children = ( 116 | 609C395219480150000BBBBE /* Info.plist */, 117 | ); 118 | name = "Supporting Files"; 119 | sourceTree = ""; 120 | }; 121 | /* End PBXGroup section */ 122 | 123 | /* Begin PBXNativeTarget section */ 124 | 609C393A1948014F000BBBBE /* Giants */ = { 125 | isa = PBXNativeTarget; 126 | buildConfigurationList = 609C395719480150000BBBBE /* Build configuration list for PBXNativeTarget "Giants" */; 127 | buildPhases = ( 128 | 609C39371948014F000BBBBE /* Sources */, 129 | 609C39381948014F000BBBBE /* Frameworks */, 130 | 609C39391948014F000BBBBE /* Resources */, 131 | ); 132 | buildRules = ( 133 | ); 134 | dependencies = ( 135 | ); 136 | name = Giants; 137 | productName = Giants; 138 | productReference = 609C393B1948014F000BBBBE /* Giants.app */; 139 | productType = "com.apple.product-type.application"; 140 | }; 141 | 609C394C19480150000BBBBE /* GiantsTests */ = { 142 | isa = PBXNativeTarget; 143 | buildConfigurationList = 609C395A19480150000BBBBE /* Build configuration list for PBXNativeTarget "GiantsTests" */; 144 | buildPhases = ( 145 | 609C394919480150000BBBBE /* Sources */, 146 | 609C394A19480150000BBBBE /* Frameworks */, 147 | 609C394B19480150000BBBBE /* Resources */, 148 | ); 149 | buildRules = ( 150 | ); 151 | dependencies = ( 152 | 609C394F19480150000BBBBE /* PBXTargetDependency */, 153 | ); 154 | name = GiantsTests; 155 | productName = GiantsTests; 156 | productReference = 609C394D19480150000BBBBE /* GiantsTests.xctest */; 157 | productType = "com.apple.product-type.bundle.unit-test"; 158 | }; 159 | /* End PBXNativeTarget section */ 160 | 161 | /* Begin PBXProject section */ 162 | 609C39331948014F000BBBBE /* Project object */ = { 163 | isa = PBXProject; 164 | attributes = { 165 | LastUpgradeCheck = 0600; 166 | ORGANIZATIONNAME = "Lee Brimelow"; 167 | TargetAttributes = { 168 | 609C393A1948014F000BBBBE = { 169 | CreatedOnToolsVersion = 6.0; 170 | }; 171 | 609C394C19480150000BBBBE = { 172 | CreatedOnToolsVersion = 6.0; 173 | TestTargetID = 609C393A1948014F000BBBBE; 174 | }; 175 | }; 176 | }; 177 | buildConfigurationList = 609C39361948014F000BBBBE /* Build configuration list for PBXProject "Giants" */; 178 | compatibilityVersion = "Xcode 3.2"; 179 | developmentRegion = English; 180 | hasScannedForEncodings = 0; 181 | knownRegions = ( 182 | en, 183 | Base, 184 | ); 185 | mainGroup = 609C39321948014F000BBBBE; 186 | productRefGroup = 609C393C1948014F000BBBBE /* Products */; 187 | projectDirPath = ""; 188 | projectRoot = ""; 189 | targets = ( 190 | 609C393A1948014F000BBBBE /* Giants */, 191 | 609C394C19480150000BBBBE /* GiantsTests */, 192 | ); 193 | }; 194 | /* End PBXProject section */ 195 | 196 | /* Begin PBXResourcesBuildPhase section */ 197 | 609C39391948014F000BBBBE /* Resources */ = { 198 | isa = PBXResourcesBuildPhase; 199 | buildActionMask = 2147483647; 200 | files = ( 201 | 609C39461948014F000BBBBE /* Main.storyboard in Resources */, 202 | 609C395F1948017C000BBBBE /* giants.png in Resources */, 203 | 609C39481948014F000BBBBE /* Images.xcassets in Resources */, 204 | 609C39601948017C000BBBBE /* pence.png in Resources */, 205 | ); 206 | runOnlyForDeploymentPostprocessing = 0; 207 | }; 208 | 609C394B19480150000BBBBE /* Resources */ = { 209 | isa = PBXResourcesBuildPhase; 210 | buildActionMask = 2147483647; 211 | files = ( 212 | ); 213 | runOnlyForDeploymentPostprocessing = 0; 214 | }; 215 | /* End PBXResourcesBuildPhase section */ 216 | 217 | /* Begin PBXSourcesBuildPhase section */ 218 | 609C39371948014F000BBBBE /* Sources */ = { 219 | isa = PBXSourcesBuildPhase; 220 | buildActionMask = 2147483647; 221 | files = ( 222 | 609C39431948014F000BBBBE /* ViewController.swift in Sources */, 223 | 609C39411948014F000BBBBE /* AppDelegate.swift in Sources */, 224 | 609C3962194802B5000BBBBE /* UIImage+Cropping.swift in Sources */, 225 | ); 226 | runOnlyForDeploymentPostprocessing = 0; 227 | }; 228 | 609C394919480150000BBBBE /* Sources */ = { 229 | isa = PBXSourcesBuildPhase; 230 | buildActionMask = 2147483647; 231 | files = ( 232 | 609C395419480150000BBBBE /* GiantsTests.swift in Sources */, 233 | ); 234 | runOnlyForDeploymentPostprocessing = 0; 235 | }; 236 | /* End PBXSourcesBuildPhase section */ 237 | 238 | /* Begin PBXTargetDependency section */ 239 | 609C394F19480150000BBBBE /* PBXTargetDependency */ = { 240 | isa = PBXTargetDependency; 241 | target = 609C393A1948014F000BBBBE /* Giants */; 242 | targetProxy = 609C394E19480150000BBBBE /* PBXContainerItemProxy */; 243 | }; 244 | /* End PBXTargetDependency section */ 245 | 246 | /* Begin PBXVariantGroup section */ 247 | 609C39441948014F000BBBBE /* Main.storyboard */ = { 248 | isa = PBXVariantGroup; 249 | children = ( 250 | 609C39451948014F000BBBBE /* Base */, 251 | ); 252 | name = Main.storyboard; 253 | sourceTree = ""; 254 | }; 255 | /* End PBXVariantGroup section */ 256 | 257 | /* Begin XCBuildConfiguration section */ 258 | 609C395519480150000BBBBE /* Debug */ = { 259 | isa = XCBuildConfiguration; 260 | buildSettings = { 261 | ALWAYS_SEARCH_USER_PATHS = NO; 262 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 263 | CLANG_CXX_LIBRARY = "libc++"; 264 | CLANG_ENABLE_MODULES = YES; 265 | CLANG_ENABLE_OBJC_ARC = YES; 266 | CLANG_WARN_BOOL_CONVERSION = YES; 267 | CLANG_WARN_CONSTANT_CONVERSION = YES; 268 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 269 | CLANG_WARN_EMPTY_BODY = YES; 270 | CLANG_WARN_ENUM_CONVERSION = YES; 271 | CLANG_WARN_INT_CONVERSION = YES; 272 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 273 | CLANG_WARN_UNREACHABLE_CODE = YES; 274 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 275 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 276 | COPY_PHASE_STRIP = NO; 277 | ENABLE_STRICT_OBJC_MSGSEND = YES; 278 | GCC_C_LANGUAGE_STANDARD = gnu99; 279 | GCC_DYNAMIC_NO_PIC = NO; 280 | GCC_OPTIMIZATION_LEVEL = 0; 281 | GCC_PREPROCESSOR_DEFINITIONS = ( 282 | "DEBUG=1", 283 | "$(inherited)", 284 | ); 285 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 286 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 287 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 288 | GCC_WARN_UNDECLARED_SELECTOR = YES; 289 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 290 | GCC_WARN_UNUSED_FUNCTION = YES; 291 | GCC_WARN_UNUSED_VARIABLE = YES; 292 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 293 | METAL_ENABLE_DEBUG_INFO = YES; 294 | ONLY_ACTIVE_ARCH = YES; 295 | SDKROOT = iphoneos; 296 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 297 | TARGETED_DEVICE_FAMILY = "1,2"; 298 | }; 299 | name = Debug; 300 | }; 301 | 609C395619480150000BBBBE /* Release */ = { 302 | isa = XCBuildConfiguration; 303 | buildSettings = { 304 | ALWAYS_SEARCH_USER_PATHS = NO; 305 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 306 | CLANG_CXX_LIBRARY = "libc++"; 307 | CLANG_ENABLE_MODULES = YES; 308 | CLANG_ENABLE_OBJC_ARC = YES; 309 | CLANG_WARN_BOOL_CONVERSION = YES; 310 | CLANG_WARN_CONSTANT_CONVERSION = YES; 311 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 312 | CLANG_WARN_EMPTY_BODY = YES; 313 | CLANG_WARN_ENUM_CONVERSION = YES; 314 | CLANG_WARN_INT_CONVERSION = YES; 315 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 316 | CLANG_WARN_UNREACHABLE_CODE = YES; 317 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 318 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 319 | COPY_PHASE_STRIP = YES; 320 | ENABLE_NS_ASSERTIONS = NO; 321 | ENABLE_STRICT_OBJC_MSGSEND = YES; 322 | GCC_C_LANGUAGE_STANDARD = gnu99; 323 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 324 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 325 | GCC_WARN_UNDECLARED_SELECTOR = YES; 326 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 327 | GCC_WARN_UNUSED_FUNCTION = YES; 328 | GCC_WARN_UNUSED_VARIABLE = YES; 329 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 330 | METAL_ENABLE_DEBUG_INFO = NO; 331 | SDKROOT = iphoneos; 332 | TARGETED_DEVICE_FAMILY = "1,2"; 333 | VALIDATE_PRODUCT = YES; 334 | }; 335 | name = Release; 336 | }; 337 | 609C395819480150000BBBBE /* Debug */ = { 338 | isa = XCBuildConfiguration; 339 | buildSettings = { 340 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 341 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 342 | INFOPLIST_FILE = Giants/Info.plist; 343 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 344 | PRODUCT_NAME = "$(TARGET_NAME)"; 345 | }; 346 | name = Debug; 347 | }; 348 | 609C395919480150000BBBBE /* Release */ = { 349 | isa = XCBuildConfiguration; 350 | buildSettings = { 351 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 352 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 353 | INFOPLIST_FILE = Giants/Info.plist; 354 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 355 | PRODUCT_NAME = "$(TARGET_NAME)"; 356 | }; 357 | name = Release; 358 | }; 359 | 609C395B19480150000BBBBE /* Debug */ = { 360 | isa = XCBuildConfiguration; 361 | buildSettings = { 362 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/Giants.app/Giants"; 363 | FRAMEWORK_SEARCH_PATHS = ( 364 | "$(SDKROOT)/Developer/Library/Frameworks", 365 | "$(inherited)", 366 | ); 367 | GCC_PREPROCESSOR_DEFINITIONS = ( 368 | "DEBUG=1", 369 | "$(inherited)", 370 | ); 371 | INFOPLIST_FILE = GiantsTests/Info.plist; 372 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 373 | METAL_ENABLE_DEBUG_INFO = YES; 374 | PRODUCT_NAME = "$(TARGET_NAME)"; 375 | TEST_HOST = "$(BUNDLE_LOADER)"; 376 | }; 377 | name = Debug; 378 | }; 379 | 609C395C19480150000BBBBE /* Release */ = { 380 | isa = XCBuildConfiguration; 381 | buildSettings = { 382 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/Giants.app/Giants"; 383 | FRAMEWORK_SEARCH_PATHS = ( 384 | "$(SDKROOT)/Developer/Library/Frameworks", 385 | "$(inherited)", 386 | ); 387 | INFOPLIST_FILE = GiantsTests/Info.plist; 388 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 389 | METAL_ENABLE_DEBUG_INFO = NO; 390 | PRODUCT_NAME = "$(TARGET_NAME)"; 391 | TEST_HOST = "$(BUNDLE_LOADER)"; 392 | }; 393 | name = Release; 394 | }; 395 | /* End XCBuildConfiguration section */ 396 | 397 | /* Begin XCConfigurationList section */ 398 | 609C39361948014F000BBBBE /* Build configuration list for PBXProject "Giants" */ = { 399 | isa = XCConfigurationList; 400 | buildConfigurations = ( 401 | 609C395519480150000BBBBE /* Debug */, 402 | 609C395619480150000BBBBE /* Release */, 403 | ); 404 | defaultConfigurationIsVisible = 0; 405 | defaultConfigurationName = Release; 406 | }; 407 | 609C395719480150000BBBBE /* Build configuration list for PBXNativeTarget "Giants" */ = { 408 | isa = XCConfigurationList; 409 | buildConfigurations = ( 410 | 609C395819480150000BBBBE /* Debug */, 411 | 609C395919480150000BBBBE /* Release */, 412 | ); 413 | defaultConfigurationIsVisible = 0; 414 | }; 415 | 609C395A19480150000BBBBE /* Build configuration list for PBXNativeTarget "GiantsTests" */ = { 416 | isa = XCConfigurationList; 417 | buildConfigurations = ( 418 | 609C395B19480150000BBBBE /* Debug */, 419 | 609C395C19480150000BBBBE /* Release */, 420 | ); 421 | defaultConfigurationIsVisible = 0; 422 | }; 423 | /* End XCConfigurationList section */ 424 | }; 425 | rootObject = 609C39331948014F000BBBBE /* Project object */; 426 | } 427 | -------------------------------------------------------------------------------- /Creating Class Extensions/Giants.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Creating Class Extensions/Giants.xcodeproj/project.xcworkspace/xcuserdata/brimelow.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brimelow/Swift-Video-Tutorials/0b65a3f79a2ac4745aea5f113046ec88adda87e0/Creating Class Extensions/Giants.xcodeproj/project.xcworkspace/xcuserdata/brimelow.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /Creating Class Extensions/Giants.xcodeproj/xcuserdata/brimelow.xcuserdatad/xcschemes/Giants.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 61 | 62 | 68 | 69 | 70 | 71 | 72 | 73 | 79 | 80 | 86 | 87 | 88 | 89 | 91 | 92 | 95 | 96 | 97 | -------------------------------------------------------------------------------- /Creating Class Extensions/Giants.xcodeproj/xcuserdata/brimelow.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Giants.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 609C393A1948014F000BBBBE 16 | 17 | primary 18 | 19 | 20 | 609C394C19480150000BBBBE 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Creating Class Extensions/Giants/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // Giants 4 | // 5 | // Created by Lee Brimelow on 6/10/14. 6 | // Copyright (c) 2014 Lee Brimelow. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: NSDictionary?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(application: UIApplication) { 23 | // 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. 24 | // 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. 25 | } 26 | 27 | func applicationDidEnterBackground(application: UIApplication) { 28 | // 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. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(application: UIApplication) { 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 | func applicationDidBecomeActive(application: UIApplication) { 37 | // 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. 38 | } 39 | 40 | func applicationWillTerminate(application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /Creating Class Extensions/Giants/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 | 24 | 25 | 26 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /Creating Class Extensions/Giants/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 | "idiom" : "ipad", 20 | "size" : "29x29", 21 | "scale" : "1x" 22 | }, 23 | { 24 | "idiom" : "ipad", 25 | "size" : "29x29", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "ipad", 30 | "size" : "40x40", 31 | "scale" : "1x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "40x40", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "76x76", 41 | "scale" : "1x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "76x76", 46 | "scale" : "2x" 47 | } 48 | ], 49 | "info" : { 50 | "version" : 1, 51 | "author" : "xcode" 52 | } 53 | } -------------------------------------------------------------------------------- /Creating Class Extensions/Giants/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 | "orientation" : "portrait", 20 | "idiom" : "ipad", 21 | "extent" : "full-screen", 22 | "minimum-system-version" : "7.0", 23 | "scale" : "1x" 24 | }, 25 | { 26 | "orientation" : "landscape", 27 | "idiom" : "ipad", 28 | "extent" : "full-screen", 29 | "minimum-system-version" : "7.0", 30 | "scale" : "1x" 31 | }, 32 | { 33 | "orientation" : "portrait", 34 | "idiom" : "ipad", 35 | "extent" : "full-screen", 36 | "minimum-system-version" : "7.0", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "orientation" : "landscape", 41 | "idiom" : "ipad", 42 | "extent" : "full-screen", 43 | "minimum-system-version" : "7.0", 44 | "scale" : "2x" 45 | } 46 | ], 47 | "info" : { 48 | "version" : 1, 49 | "author" : "xcode" 50 | } 51 | } -------------------------------------------------------------------------------- /Creating Class Extensions/Giants/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.leebrimelow.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /Creating Class Extensions/Giants/UIImage+Cropping.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UIImage+Cropping.swift 3 | // Giants 4 | // 5 | // Created by Lee Brimelow on 6/10/14. 6 | // Copyright (c) 2014 Lee Brimelow. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | extension UIImage { 12 | 13 | func cropToCircleWithBorderColor(color: UIColor, lineWidth: CGFloat) -> UIImage { 14 | 15 | let imgRect = CGRect(origin: CGPointZero, size: self.size) 16 | 17 | UIGraphicsBeginImageContext(imgRect.size) 18 | var context = UIGraphicsGetCurrentContext() 19 | 20 | CGContextAddEllipseInRect(context, imgRect) 21 | CGContextClip(context) 22 | 23 | self.drawAtPoint(CGPointZero) 24 | 25 | CGContextAddEllipseInRect(context, imgRect) 26 | color.setStroke() 27 | CGContextSetLineWidth(context, lineWidth) 28 | CGContextStrokePath(context) 29 | 30 | let newImage = UIGraphicsGetImageFromCurrentImageContext() 31 | 32 | CGContextRelease(context) 33 | 34 | return newImage 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /Creating Class Extensions/Giants/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // Giants 4 | // 5 | // Created by Lee Brimelow on 6/10/14. 6 | // Copyright (c) 2014 Lee Brimelow. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ViewController: UIViewController { 12 | 13 | @IBOutlet var imageView : UIImageView = nil 14 | 15 | override func viewDidLoad() { 16 | super.viewDidLoad() 17 | 18 | let img = imageView.image 19 | imageView.image = img.cropToCircleWithBorderColor(UIColor(red:0.91, green:0.34, blue:0.16, alpha:1.00), lineWidth: 20) 20 | } 21 | 22 | override func didReceiveMemoryWarning() { 23 | super.didReceiveMemoryWarning() 24 | // Dispose of any resources that can be recreated. 25 | } 26 | 27 | 28 | } 29 | 30 | -------------------------------------------------------------------------------- /Creating Class Extensions/Giants/giants.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brimelow/Swift-Video-Tutorials/0b65a3f79a2ac4745aea5f113046ec88adda87e0/Creating Class Extensions/Giants/giants.png -------------------------------------------------------------------------------- /Creating Class Extensions/Giants/pence.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brimelow/Swift-Video-Tutorials/0b65a3f79a2ac4745aea5f113046ec88adda87e0/Creating Class Extensions/Giants/pence.png -------------------------------------------------------------------------------- /Creating Class Extensions/GiantsTests/GiantsTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GiantsTests.swift 3 | // GiantsTests 4 | // 5 | // Created by Lee Brimelow on 6/10/14. 6 | // Copyright (c) 2014 Lee Brimelow. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class GiantsTests: XCTestCase { 12 | 13 | override func setUp() { 14 | super.setUp() 15 | // Put setup code here. This method is called before the invocation of each test method in the class. 16 | } 17 | 18 | override func tearDown() { 19 | // Put teardown code here. This method is called after the invocation of each test method in the class. 20 | super.tearDown() 21 | } 22 | 23 | func testExample() { 24 | // This is an example of a functional test case. 25 | XCTAssert(true, "Pass") 26 | } 27 | 28 | func testPerformanceExample() { 29 | // This is an example of a performance test case. 30 | self.measureBlock() { 31 | // Put the code you want to measure the time of here. 32 | } 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /Creating Class Extensions/GiantsTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.leebrimelow.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /Five Must Know Features/Arrays.playground/contents.xcplayground: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Five Must Know Features/Arrays.playground/section-1.swift: -------------------------------------------------------------------------------- 1 | // Playground - noun: a place where people can play 2 | 3 | import UIKit 4 | 5 | var arr = [1,2,3,4] 6 | arr.append(10) 7 | arr += [45,6,89,7] 8 | arr.first 9 | arr.last 10 | arr.removeLast() 11 | arr[1...3] = [123,5,3] 12 | 13 | arr 14 | 15 | var arr2 = [Int](count: 20, repeatedValue: 50) -------------------------------------------------------------------------------- /Five Must Know Features/Arrays.playground/timeline.xctimeline: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Five Must Know Features/ComputedProps.playground/contents.xcplayground: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Five Must Know Features/ComputedProps.playground/section-1.swift: -------------------------------------------------------------------------------- 1 | // Playground - noun: a place where people can play 2 | 3 | import UIKit 4 | 5 | class MyView: UIView { 6 | 7 | var size: CGSize { 8 | get { 9 | return bounds.size 10 | } 11 | set(newSize) { 12 | var f = frame 13 | f.size = newSize 14 | frame = f 15 | } 16 | } 17 | 18 | } 19 | 20 | let view = MyView(frame: CGRectMake(0, 0, 200, 200)) 21 | view.size = CGSizeMake(400, 400) -------------------------------------------------------------------------------- /Five Must Know Features/ComputedProps.playground/timeline.xctimeline: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Five Must Know Features/Enums.playground/contents.xcplayground: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Five Must Know Features/Enums.playground/section-1.swift: -------------------------------------------------------------------------------- 1 | // Playground - noun: a place where people can play 2 | 3 | import UIKit 4 | 5 | enum Corners: Int { 6 | case Top = 1 7 | case Bottom 8 | case Right 9 | case Left 10 | } 11 | 12 | Corners.Right.rawValue 13 | Corners(rawValue: 3) == Corners.Right 14 | 15 | var corner = Corners.Left 16 | corner = .Right 17 | 18 | 19 | // ----------------------------------- 20 | 21 | 22 | //enum Corners { 23 | // case Right(CGPoint) 24 | //} 25 | // 26 | //var corner = Corners.Right(CGPointZero) 27 | 28 | -------------------------------------------------------------------------------- /Five Must Know Features/Enums.playground/timeline.xctimeline: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Five Must Know Features/Tuples.playground/contents.xcplayground: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Five Must Know Features/Tuples.playground/section-1.swift: -------------------------------------------------------------------------------- 1 | // Playground - noun: a place where people can play 2 | 3 | import UIKit 4 | 5 | var weight = (214, "214lbs") 6 | 7 | print(weight.0) 8 | print(weight.1) 9 | 10 | let (_, weightStr) = weight 11 | print(weightStr) 12 | 13 | 14 | //----------------------------------------- 15 | 16 | 17 | func stringInfo(str: String) -> (words: NSArray, num: Int) { 18 | 19 | let words = str.componentsSeparatedByString(" ") 20 | 21 | var num = 0 22 | 23 | for word in words { 24 | if word == "the" { 25 | num++ 26 | } 27 | } 28 | 29 | return (words, num) 30 | } 31 | 32 | let (words, num) = stringInfo("The Giants played at the Polo Grounds in Manhattan, New York, until the close of the 1957 season, after which they moved west to California to become the San Francisco Giants. As the New York Giants, they won 14 pennants and 5 World Series championships behind managers such as John McGraw and Bill Terry and players like Christy Mathewson, Carl Hubbell, Mel Ott, Bobby Thomson, and Willie Mays. The Giants have won six pennants and three World Series championships since arriving in San Francisco. They are the newly crowned World Champions of Baseball for 2014 after defeating the Kansas City Royals 4 games to 3 during the 2014 World Series on October 29, 2014.") 33 | num -------------------------------------------------------------------------------- /Five Must Know Features/Tuples.playground/timeline.xctimeline: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Menubar App/MenubarApp.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 601FC4FC19F4BC7400BD8E6B /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 601FC4FB19F4BC7400BD8E6B /* AppDelegate.swift */; }; 11 | 601FC4FE19F4BC7400BD8E6B /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 601FC4FD19F4BC7400BD8E6B /* Images.xcassets */; }; 12 | 601FC50119F4BC7400BD8E6B /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 601FC4FF19F4BC7400BD8E6B /* MainMenu.xib */; }; 13 | 601FC50D19F4BC7400BD8E6B /* MenubarAppTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 601FC50C19F4BC7400BD8E6B /* MenubarAppTests.swift */; }; 14 | /* End PBXBuildFile section */ 15 | 16 | /* Begin PBXContainerItemProxy section */ 17 | 601FC50719F4BC7400BD8E6B /* PBXContainerItemProxy */ = { 18 | isa = PBXContainerItemProxy; 19 | containerPortal = 601FC4EE19F4BC7400BD8E6B /* Project object */; 20 | proxyType = 1; 21 | remoteGlobalIDString = 601FC4F519F4BC7400BD8E6B; 22 | remoteInfo = MenubarApp; 23 | }; 24 | /* End PBXContainerItemProxy section */ 25 | 26 | /* Begin PBXFileReference section */ 27 | 601FC4F619F4BC7400BD8E6B /* MenubarApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MenubarApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; 28 | 601FC4FA19F4BC7400BD8E6B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 29 | 601FC4FB19F4BC7400BD8E6B /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 30 | 601FC4FD19F4BC7400BD8E6B /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 31 | 601FC50019F4BC7400BD8E6B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; 32 | 601FC50619F4BC7400BD8E6B /* MenubarAppTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MenubarAppTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 33 | 601FC50B19F4BC7400BD8E6B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 34 | 601FC50C19F4BC7400BD8E6B /* MenubarAppTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenubarAppTests.swift; sourceTree = ""; }; 35 | /* End PBXFileReference section */ 36 | 37 | /* Begin PBXFrameworksBuildPhase section */ 38 | 601FC4F319F4BC7400BD8E6B /* Frameworks */ = { 39 | isa = PBXFrameworksBuildPhase; 40 | buildActionMask = 2147483647; 41 | files = ( 42 | ); 43 | runOnlyForDeploymentPostprocessing = 0; 44 | }; 45 | 601FC50319F4BC7400BD8E6B /* Frameworks */ = { 46 | isa = PBXFrameworksBuildPhase; 47 | buildActionMask = 2147483647; 48 | files = ( 49 | ); 50 | runOnlyForDeploymentPostprocessing = 0; 51 | }; 52 | /* End PBXFrameworksBuildPhase section */ 53 | 54 | /* Begin PBXGroup section */ 55 | 601FC4ED19F4BC7400BD8E6B = { 56 | isa = PBXGroup; 57 | children = ( 58 | 601FC4F819F4BC7400BD8E6B /* MenubarApp */, 59 | 601FC50919F4BC7400BD8E6B /* MenubarAppTests */, 60 | 601FC4F719F4BC7400BD8E6B /* Products */, 61 | ); 62 | sourceTree = ""; 63 | }; 64 | 601FC4F719F4BC7400BD8E6B /* Products */ = { 65 | isa = PBXGroup; 66 | children = ( 67 | 601FC4F619F4BC7400BD8E6B /* MenubarApp.app */, 68 | 601FC50619F4BC7400BD8E6B /* MenubarAppTests.xctest */, 69 | ); 70 | name = Products; 71 | sourceTree = ""; 72 | }; 73 | 601FC4F819F4BC7400BD8E6B /* MenubarApp */ = { 74 | isa = PBXGroup; 75 | children = ( 76 | 601FC4FB19F4BC7400BD8E6B /* AppDelegate.swift */, 77 | 601FC4FD19F4BC7400BD8E6B /* Images.xcassets */, 78 | 601FC4FF19F4BC7400BD8E6B /* MainMenu.xib */, 79 | 601FC4F919F4BC7400BD8E6B /* Supporting Files */, 80 | ); 81 | path = MenubarApp; 82 | sourceTree = ""; 83 | }; 84 | 601FC4F919F4BC7400BD8E6B /* Supporting Files */ = { 85 | isa = PBXGroup; 86 | children = ( 87 | 601FC4FA19F4BC7400BD8E6B /* Info.plist */, 88 | ); 89 | name = "Supporting Files"; 90 | sourceTree = ""; 91 | }; 92 | 601FC50919F4BC7400BD8E6B /* MenubarAppTests */ = { 93 | isa = PBXGroup; 94 | children = ( 95 | 601FC50C19F4BC7400BD8E6B /* MenubarAppTests.swift */, 96 | 601FC50A19F4BC7400BD8E6B /* Supporting Files */, 97 | ); 98 | path = MenubarAppTests; 99 | sourceTree = ""; 100 | }; 101 | 601FC50A19F4BC7400BD8E6B /* Supporting Files */ = { 102 | isa = PBXGroup; 103 | children = ( 104 | 601FC50B19F4BC7400BD8E6B /* Info.plist */, 105 | ); 106 | name = "Supporting Files"; 107 | sourceTree = ""; 108 | }; 109 | /* End PBXGroup section */ 110 | 111 | /* Begin PBXNativeTarget section */ 112 | 601FC4F519F4BC7400BD8E6B /* MenubarApp */ = { 113 | isa = PBXNativeTarget; 114 | buildConfigurationList = 601FC51019F4BC7400BD8E6B /* Build configuration list for PBXNativeTarget "MenubarApp" */; 115 | buildPhases = ( 116 | 601FC4F219F4BC7400BD8E6B /* Sources */, 117 | 601FC4F319F4BC7400BD8E6B /* Frameworks */, 118 | 601FC4F419F4BC7400BD8E6B /* Resources */, 119 | ); 120 | buildRules = ( 121 | ); 122 | dependencies = ( 123 | ); 124 | name = MenubarApp; 125 | productName = MenubarApp; 126 | productReference = 601FC4F619F4BC7400BD8E6B /* MenubarApp.app */; 127 | productType = "com.apple.product-type.application"; 128 | }; 129 | 601FC50519F4BC7400BD8E6B /* MenubarAppTests */ = { 130 | isa = PBXNativeTarget; 131 | buildConfigurationList = 601FC51319F4BC7400BD8E6B /* Build configuration list for PBXNativeTarget "MenubarAppTests" */; 132 | buildPhases = ( 133 | 601FC50219F4BC7400BD8E6B /* Sources */, 134 | 601FC50319F4BC7400BD8E6B /* Frameworks */, 135 | 601FC50419F4BC7400BD8E6B /* Resources */, 136 | ); 137 | buildRules = ( 138 | ); 139 | dependencies = ( 140 | 601FC50819F4BC7400BD8E6B /* PBXTargetDependency */, 141 | ); 142 | name = MenubarAppTests; 143 | productName = MenubarAppTests; 144 | productReference = 601FC50619F4BC7400BD8E6B /* MenubarAppTests.xctest */; 145 | productType = "com.apple.product-type.bundle.unit-test"; 146 | }; 147 | /* End PBXNativeTarget section */ 148 | 149 | /* Begin PBXProject section */ 150 | 601FC4EE19F4BC7400BD8E6B /* Project object */ = { 151 | isa = PBXProject; 152 | attributes = { 153 | LastUpgradeCheck = 0610; 154 | ORGANIZATIONNAME = "Lee Brimelow"; 155 | TargetAttributes = { 156 | 601FC4F519F4BC7400BD8E6B = { 157 | CreatedOnToolsVersion = 6.1; 158 | }; 159 | 601FC50519F4BC7400BD8E6B = { 160 | CreatedOnToolsVersion = 6.1; 161 | TestTargetID = 601FC4F519F4BC7400BD8E6B; 162 | }; 163 | }; 164 | }; 165 | buildConfigurationList = 601FC4F119F4BC7400BD8E6B /* Build configuration list for PBXProject "MenubarApp" */; 166 | compatibilityVersion = "Xcode 3.2"; 167 | developmentRegion = English; 168 | hasScannedForEncodings = 0; 169 | knownRegions = ( 170 | en, 171 | Base, 172 | ); 173 | mainGroup = 601FC4ED19F4BC7400BD8E6B; 174 | productRefGroup = 601FC4F719F4BC7400BD8E6B /* Products */; 175 | projectDirPath = ""; 176 | projectRoot = ""; 177 | targets = ( 178 | 601FC4F519F4BC7400BD8E6B /* MenubarApp */, 179 | 601FC50519F4BC7400BD8E6B /* MenubarAppTests */, 180 | ); 181 | }; 182 | /* End PBXProject section */ 183 | 184 | /* Begin PBXResourcesBuildPhase section */ 185 | 601FC4F419F4BC7400BD8E6B /* Resources */ = { 186 | isa = PBXResourcesBuildPhase; 187 | buildActionMask = 2147483647; 188 | files = ( 189 | 601FC4FE19F4BC7400BD8E6B /* Images.xcassets in Resources */, 190 | 601FC50119F4BC7400BD8E6B /* MainMenu.xib in Resources */, 191 | ); 192 | runOnlyForDeploymentPostprocessing = 0; 193 | }; 194 | 601FC50419F4BC7400BD8E6B /* Resources */ = { 195 | isa = PBXResourcesBuildPhase; 196 | buildActionMask = 2147483647; 197 | files = ( 198 | ); 199 | runOnlyForDeploymentPostprocessing = 0; 200 | }; 201 | /* End PBXResourcesBuildPhase section */ 202 | 203 | /* Begin PBXSourcesBuildPhase section */ 204 | 601FC4F219F4BC7400BD8E6B /* Sources */ = { 205 | isa = PBXSourcesBuildPhase; 206 | buildActionMask = 2147483647; 207 | files = ( 208 | 601FC4FC19F4BC7400BD8E6B /* AppDelegate.swift in Sources */, 209 | ); 210 | runOnlyForDeploymentPostprocessing = 0; 211 | }; 212 | 601FC50219F4BC7400BD8E6B /* Sources */ = { 213 | isa = PBXSourcesBuildPhase; 214 | buildActionMask = 2147483647; 215 | files = ( 216 | 601FC50D19F4BC7400BD8E6B /* MenubarAppTests.swift in Sources */, 217 | ); 218 | runOnlyForDeploymentPostprocessing = 0; 219 | }; 220 | /* End PBXSourcesBuildPhase section */ 221 | 222 | /* Begin PBXTargetDependency section */ 223 | 601FC50819F4BC7400BD8E6B /* PBXTargetDependency */ = { 224 | isa = PBXTargetDependency; 225 | target = 601FC4F519F4BC7400BD8E6B /* MenubarApp */; 226 | targetProxy = 601FC50719F4BC7400BD8E6B /* PBXContainerItemProxy */; 227 | }; 228 | /* End PBXTargetDependency section */ 229 | 230 | /* Begin PBXVariantGroup section */ 231 | 601FC4FF19F4BC7400BD8E6B /* MainMenu.xib */ = { 232 | isa = PBXVariantGroup; 233 | children = ( 234 | 601FC50019F4BC7400BD8E6B /* Base */, 235 | ); 236 | name = MainMenu.xib; 237 | sourceTree = ""; 238 | }; 239 | /* End PBXVariantGroup section */ 240 | 241 | /* Begin XCBuildConfiguration section */ 242 | 601FC50E19F4BC7400BD8E6B /* Debug */ = { 243 | isa = XCBuildConfiguration; 244 | buildSettings = { 245 | ALWAYS_SEARCH_USER_PATHS = NO; 246 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 247 | CLANG_CXX_LIBRARY = "libc++"; 248 | CLANG_ENABLE_MODULES = YES; 249 | CLANG_ENABLE_OBJC_ARC = YES; 250 | CLANG_WARN_BOOL_CONVERSION = YES; 251 | CLANG_WARN_CONSTANT_CONVERSION = YES; 252 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 253 | CLANG_WARN_EMPTY_BODY = YES; 254 | CLANG_WARN_ENUM_CONVERSION = YES; 255 | CLANG_WARN_INT_CONVERSION = YES; 256 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 257 | CLANG_WARN_UNREACHABLE_CODE = YES; 258 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 259 | CODE_SIGN_IDENTITY = "-"; 260 | COPY_PHASE_STRIP = NO; 261 | ENABLE_STRICT_OBJC_MSGSEND = YES; 262 | GCC_C_LANGUAGE_STANDARD = gnu99; 263 | GCC_DYNAMIC_NO_PIC = NO; 264 | GCC_OPTIMIZATION_LEVEL = 0; 265 | GCC_PREPROCESSOR_DEFINITIONS = ( 266 | "DEBUG=1", 267 | "$(inherited)", 268 | ); 269 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 270 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 271 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 272 | GCC_WARN_UNDECLARED_SELECTOR = YES; 273 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 274 | GCC_WARN_UNUSED_FUNCTION = YES; 275 | GCC_WARN_UNUSED_VARIABLE = YES; 276 | MACOSX_DEPLOYMENT_TARGET = 10.10; 277 | MTL_ENABLE_DEBUG_INFO = YES; 278 | ONLY_ACTIVE_ARCH = YES; 279 | SDKROOT = macosx; 280 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 281 | }; 282 | name = Debug; 283 | }; 284 | 601FC50F19F4BC7400BD8E6B /* Release */ = { 285 | isa = XCBuildConfiguration; 286 | buildSettings = { 287 | ALWAYS_SEARCH_USER_PATHS = NO; 288 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 289 | CLANG_CXX_LIBRARY = "libc++"; 290 | CLANG_ENABLE_MODULES = YES; 291 | CLANG_ENABLE_OBJC_ARC = YES; 292 | CLANG_WARN_BOOL_CONVERSION = YES; 293 | CLANG_WARN_CONSTANT_CONVERSION = YES; 294 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 295 | CLANG_WARN_EMPTY_BODY = YES; 296 | CLANG_WARN_ENUM_CONVERSION = YES; 297 | CLANG_WARN_INT_CONVERSION = YES; 298 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 299 | CLANG_WARN_UNREACHABLE_CODE = YES; 300 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 301 | CODE_SIGN_IDENTITY = "-"; 302 | COPY_PHASE_STRIP = YES; 303 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 304 | ENABLE_NS_ASSERTIONS = NO; 305 | ENABLE_STRICT_OBJC_MSGSEND = YES; 306 | GCC_C_LANGUAGE_STANDARD = gnu99; 307 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 308 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 309 | GCC_WARN_UNDECLARED_SELECTOR = YES; 310 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 311 | GCC_WARN_UNUSED_FUNCTION = YES; 312 | GCC_WARN_UNUSED_VARIABLE = YES; 313 | MACOSX_DEPLOYMENT_TARGET = 10.10; 314 | MTL_ENABLE_DEBUG_INFO = NO; 315 | SDKROOT = macosx; 316 | }; 317 | name = Release; 318 | }; 319 | 601FC51119F4BC7400BD8E6B /* Debug */ = { 320 | isa = XCBuildConfiguration; 321 | buildSettings = { 322 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 323 | COMBINE_HIDPI_IMAGES = YES; 324 | INFOPLIST_FILE = MenubarApp/Info.plist; 325 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; 326 | PRODUCT_NAME = "$(TARGET_NAME)"; 327 | }; 328 | name = Debug; 329 | }; 330 | 601FC51219F4BC7400BD8E6B /* Release */ = { 331 | isa = XCBuildConfiguration; 332 | buildSettings = { 333 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 334 | COMBINE_HIDPI_IMAGES = YES; 335 | INFOPLIST_FILE = MenubarApp/Info.plist; 336 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; 337 | PRODUCT_NAME = "$(TARGET_NAME)"; 338 | }; 339 | name = Release; 340 | }; 341 | 601FC51419F4BC7400BD8E6B /* Debug */ = { 342 | isa = XCBuildConfiguration; 343 | buildSettings = { 344 | BUNDLE_LOADER = "$(TEST_HOST)"; 345 | COMBINE_HIDPI_IMAGES = YES; 346 | FRAMEWORK_SEARCH_PATHS = ( 347 | "$(DEVELOPER_FRAMEWORKS_DIR)", 348 | "$(inherited)", 349 | ); 350 | GCC_PREPROCESSOR_DEFINITIONS = ( 351 | "DEBUG=1", 352 | "$(inherited)", 353 | ); 354 | INFOPLIST_FILE = MenubarAppTests/Info.plist; 355 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; 356 | PRODUCT_NAME = "$(TARGET_NAME)"; 357 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MenubarApp.app/Contents/MacOS/MenubarApp"; 358 | }; 359 | name = Debug; 360 | }; 361 | 601FC51519F4BC7400BD8E6B /* Release */ = { 362 | isa = XCBuildConfiguration; 363 | buildSettings = { 364 | BUNDLE_LOADER = "$(TEST_HOST)"; 365 | COMBINE_HIDPI_IMAGES = YES; 366 | FRAMEWORK_SEARCH_PATHS = ( 367 | "$(DEVELOPER_FRAMEWORKS_DIR)", 368 | "$(inherited)", 369 | ); 370 | INFOPLIST_FILE = MenubarAppTests/Info.plist; 371 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; 372 | PRODUCT_NAME = "$(TARGET_NAME)"; 373 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MenubarApp.app/Contents/MacOS/MenubarApp"; 374 | }; 375 | name = Release; 376 | }; 377 | /* End XCBuildConfiguration section */ 378 | 379 | /* Begin XCConfigurationList section */ 380 | 601FC4F119F4BC7400BD8E6B /* Build configuration list for PBXProject "MenubarApp" */ = { 381 | isa = XCConfigurationList; 382 | buildConfigurations = ( 383 | 601FC50E19F4BC7400BD8E6B /* Debug */, 384 | 601FC50F19F4BC7400BD8E6B /* Release */, 385 | ); 386 | defaultConfigurationIsVisible = 0; 387 | defaultConfigurationName = Release; 388 | }; 389 | 601FC51019F4BC7400BD8E6B /* Build configuration list for PBXNativeTarget "MenubarApp" */ = { 390 | isa = XCConfigurationList; 391 | buildConfigurations = ( 392 | 601FC51119F4BC7400BD8E6B /* Debug */, 393 | 601FC51219F4BC7400BD8E6B /* Release */, 394 | ); 395 | defaultConfigurationIsVisible = 0; 396 | defaultConfigurationName = Release; 397 | }; 398 | 601FC51319F4BC7400BD8E6B /* Build configuration list for PBXNativeTarget "MenubarAppTests" */ = { 399 | isa = XCConfigurationList; 400 | buildConfigurations = ( 401 | 601FC51419F4BC7400BD8E6B /* Debug */, 402 | 601FC51519F4BC7400BD8E6B /* Release */, 403 | ); 404 | defaultConfigurationIsVisible = 0; 405 | defaultConfigurationName = Release; 406 | }; 407 | /* End XCConfigurationList section */ 408 | }; 409 | rootObject = 601FC4EE19F4BC7400BD8E6B /* Project object */; 410 | } 411 | -------------------------------------------------------------------------------- /Menubar App/MenubarApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Menubar App/MenubarApp.xcodeproj/project.xcworkspace/xcshareddata/MenubarApp.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | 84A8E14E-CF65-437A-ACAB-B0E6E2D3085D 9 | IDESourceControlProjectName 10 | MenubarApp 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | 366CA4AA6B486F114DE3688D25A5A3EA372929BE 14 | https://github.com/brimelow/Swift-Video-Tutorials.git 15 | 16 | IDESourceControlProjectPath 17 | Menubar App/MenubarApp.xcodeproj 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | 366CA4AA6B486F114DE3688D25A5A3EA372929BE 21 | ../../.. 22 | 23 | IDESourceControlProjectURL 24 | https://github.com/brimelow/Swift-Video-Tutorials.git 25 | IDESourceControlProjectVersion 26 | 111 27 | IDESourceControlProjectWCCIdentifier 28 | 366CA4AA6B486F114DE3688D25A5A3EA372929BE 29 | IDESourceControlProjectWCConfigurations 30 | 31 | 32 | IDESourceControlRepositoryExtensionIdentifierKey 33 | public.vcs.git 34 | IDESourceControlWCCIdentifierKey 35 | 366CA4AA6B486F114DE3688D25A5A3EA372929BE 36 | IDESourceControlWCCName 37 | Swift%20Video%20Tutorials 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /Menubar App/MenubarApp.xcodeproj/project.xcworkspace/xcuserdata/brimelow.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brimelow/Swift-Video-Tutorials/0b65a3f79a2ac4745aea5f113046ec88adda87e0/Menubar App/MenubarApp.xcodeproj/project.xcworkspace/xcuserdata/brimelow.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /Menubar App/MenubarApp.xcodeproj/xcuserdata/brimelow.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /Menubar App/MenubarApp.xcodeproj/xcuserdata/brimelow.xcuserdatad/xcschemes/MenubarApp.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 47 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 65 | 66 | 75 | 76 | 82 | 83 | 84 | 85 | 86 | 87 | 93 | 94 | 100 | 101 | 102 | 103 | 105 | 106 | 109 | 110 | 111 | -------------------------------------------------------------------------------- /Menubar App/MenubarApp.xcodeproj/xcuserdata/brimelow.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | MenubarApp.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 601FC4F519F4BC7400BD8E6B 16 | 17 | primary 18 | 19 | 20 | 601FC50519F4BC7400BD8E6B 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Menubar App/MenubarApp/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // MenubarApp 4 | // 5 | // Created by Lee Brimelow on 10/19/14. 6 | // Copyright (c) 2014 Lee Brimelow. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | @NSApplicationMain 12 | class AppDelegate: NSObject, NSApplicationDelegate { 13 | 14 | @IBOutlet weak var window: NSWindow! 15 | @IBOutlet weak var statusMenu: NSMenu! 16 | 17 | let statusItem = NSStatusBar.systemStatusBar().statusItemWithLength(-1) 18 | 19 | func applicationDidFinishLaunching(aNotification: NSNotification?) { 20 | let icon = NSImage(named: "statusIcon") 21 | icon.setTemplate(true) 22 | 23 | statusItem.image = icon 24 | statusItem.menu = statusMenu 25 | } 26 | 27 | 28 | @IBAction func toggleClicked(sender: NSMenuItem) { 29 | 30 | let task = NSTask() 31 | task.launchPath = "/usr/bin/defaults" 32 | 33 | if(sender.state == NSOnState) { 34 | sender.state = NSOffState 35 | task.arguments = ["write", "com.apple.finder", "AppleShowAllFiles", "NO"] 36 | } 37 | else { 38 | sender.state = NSOnState 39 | task.arguments = ["write", "com.apple.finder", "AppleShowAllFiles", "YES"] 40 | } 41 | 42 | task.launch() 43 | task.waitUntilExit() 44 | 45 | let killtask = NSTask() 46 | killtask.launchPath = "/usr/bin/killall" 47 | killtask.arguments = ["Finder"] 48 | killtask.launch() 49 | 50 | } 51 | 52 | } 53 | 54 | -------------------------------------------------------------------------------- /Menubar App/MenubarApp/Base.lproj/MainMenu.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | 363 | 364 | 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | 376 | 377 | 378 | 379 | 380 | 381 | 382 | 383 | 384 | 385 | 386 | 387 | 388 | 389 | 390 | 391 | 392 | 393 | 394 | 395 | 396 | 397 | 398 | 399 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 427 | 428 | 429 | 430 | 431 | 432 | 433 | 434 | 435 | 436 | 437 | 438 | 439 | 440 | 441 | 442 | 443 | 444 | 445 | 446 | 447 | 448 | 449 | 450 | 451 | 452 | 453 | 454 | 455 | 456 | 457 | 458 | 459 | 460 | 461 | 462 | 463 | 464 | 465 | 466 | 467 | 468 | 469 | 470 | 471 | 472 | 473 | 474 | 475 | 476 | 477 | 478 | 479 | 480 | 481 | 482 | 483 | 484 | 485 | 486 | 487 | 488 | 489 | 490 | 491 | 492 | 493 | 494 | 495 | 496 | 497 | 498 | 499 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 509 | 510 | 511 | 512 | 513 | 514 | 515 | 516 | 517 | 518 | 519 | 520 | 521 | 522 | 523 | 524 | 525 | 526 | 527 | 528 | 529 | 530 | 531 | 532 | 533 | 534 | 535 | 536 | 537 | 538 | Default 539 | 540 | 541 | 542 | 543 | 544 | 545 | Left to Right 546 | 547 | 548 | 549 | 550 | 551 | 552 | Right to Left 553 | 554 | 555 | 556 | 557 | 558 | 559 | 560 | 561 | 562 | 563 | Default 564 | 565 | 566 | 567 | 568 | 569 | 570 | Left to Right 571 | 572 | 573 | 574 | 575 | 576 | 577 | Right to Left 578 | 579 | 580 | 581 | 582 | 583 | 584 | 585 | 586 | 587 | 588 | 589 | 590 | 591 | 592 | 593 | 594 | 595 | 596 | 597 | 598 | 599 | 600 | 601 | 602 | 603 | 604 | 605 | 606 | 607 | 608 | 609 | 610 | 611 | 612 | 613 | 614 | 615 | 616 | 617 | 618 | 619 | 620 | 621 | 622 | 623 | 624 | 625 | 626 | 627 | 628 | 629 | 630 | 631 | 632 | 633 | 634 | 635 | 636 | 637 | 638 | 639 | 640 | 641 | 642 | 643 | 644 | 645 | 646 | 647 | 648 | 649 | 650 | 651 | 652 | 653 | 654 | 655 | 656 | 657 | 658 | 659 | 660 | 661 | 662 | 663 | 664 | 665 | 666 | 667 | 668 | 669 | 670 | 671 | 672 | 673 | 674 | 675 | 676 | 677 | 678 | 679 | 680 | 681 | 682 | -------------------------------------------------------------------------------- /Menubar App/MenubarApp/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "mac", 5 | "size" : "16x16", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "mac", 10 | "size" : "16x16", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "mac", 15 | "size" : "32x32", 16 | "scale" : "1x" 17 | }, 18 | { 19 | "idiom" : "mac", 20 | "size" : "32x32", 21 | "scale" : "2x" 22 | }, 23 | { 24 | "idiom" : "mac", 25 | "size" : "128x128", 26 | "scale" : "1x" 27 | }, 28 | { 29 | "idiom" : "mac", 30 | "size" : "128x128", 31 | "scale" : "2x" 32 | }, 33 | { 34 | "idiom" : "mac", 35 | "size" : "256x256", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "mac", 40 | "size" : "256x256", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "mac", 45 | "size" : "512x512", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "mac", 50 | "size" : "512x512", 51 | "scale" : "2x" 52 | } 53 | ], 54 | "info" : { 55 | "version" : 1, 56 | "author" : "xcode" 57 | } 58 | } -------------------------------------------------------------------------------- /Menubar App/MenubarApp/Images.xcassets/statusIcon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "icon.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "icon@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /Menubar App/MenubarApp/Images.xcassets/statusIcon.imageset/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brimelow/Swift-Video-Tutorials/0b65a3f79a2ac4745aea5f113046ec88adda87e0/Menubar App/MenubarApp/Images.xcassets/statusIcon.imageset/icon.png -------------------------------------------------------------------------------- /Menubar App/MenubarApp/Images.xcassets/statusIcon.imageset/icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brimelow/Swift-Video-Tutorials/0b65a3f79a2ac4745aea5f113046ec88adda87e0/Menubar App/MenubarApp/Images.xcassets/statusIcon.imageset/icon@2x.png -------------------------------------------------------------------------------- /Menubar App/MenubarApp/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | com.leebrimelow.$(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 25 | LSMinimumSystemVersion 26 | $(MACOSX_DEPLOYMENT_TARGET) 27 | LSUIElement 28 | 29 | NSHumanReadableCopyright 30 | Copyright © 2014 Lee Brimelow. All rights reserved. 31 | NSMainNibFile 32 | MainMenu 33 | NSPrincipalClass 34 | NSApplication 35 | 36 | 37 | -------------------------------------------------------------------------------- /Menubar App/MenubarApp/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brimelow/Swift-Video-Tutorials/0b65a3f79a2ac4745aea5f113046ec88adda87e0/Menubar App/MenubarApp/icon.png -------------------------------------------------------------------------------- /Menubar App/MenubarApp/icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brimelow/Swift-Video-Tutorials/0b65a3f79a2ac4745aea5f113046ec88adda87e0/Menubar App/MenubarApp/icon@2x.png -------------------------------------------------------------------------------- /Menubar App/MenubarAppTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | com.leebrimelow.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /Menubar App/MenubarAppTests/MenubarAppTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MenubarAppTests.swift 3 | // MenubarAppTests 4 | // 5 | // Created by Lee Brimelow on 10/19/14. 6 | // Copyright (c) 2014 Lee Brimelow. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | import XCTest 11 | 12 | class MenubarAppTests: XCTestCase { 13 | 14 | override func setUp() { 15 | super.setUp() 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | } 18 | 19 | override func tearDown() { 20 | // Put teardown code here. This method is called after the invocation of each test method in the class. 21 | super.tearDown() 22 | } 23 | 24 | func testExample() { 25 | // This is an example of a functional test case. 26 | XCTAssert(true, "Pass") 27 | } 28 | 29 | func testPerformanceExample() { 30 | // This is an example of a performance test case. 31 | self.measureBlock() { 32 | // Put the code you want to measure the time of here. 33 | } 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /Optionals/Optionals.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 60C4638E1A01858B00DCB24F /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 60C4638D1A01858B00DCB24F /* AppDelegate.swift */; }; 11 | 60C463901A01858B00DCB24F /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 60C4638F1A01858B00DCB24F /* ViewController.swift */; }; 12 | 60C463931A01858B00DCB24F /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 60C463911A01858B00DCB24F /* Main.storyboard */; }; 13 | 60C463951A01858B00DCB24F /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 60C463941A01858B00DCB24F /* Images.xcassets */; }; 14 | 60C463981A01858B00DCB24F /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 60C463961A01858B00DCB24F /* LaunchScreen.xib */; }; 15 | 60C463A41A01858B00DCB24F /* OptionalsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 60C463A31A01858B00DCB24F /* OptionalsTests.swift */; }; 16 | /* End PBXBuildFile section */ 17 | 18 | /* Begin PBXContainerItemProxy section */ 19 | 60C4639E1A01858B00DCB24F /* PBXContainerItemProxy */ = { 20 | isa = PBXContainerItemProxy; 21 | containerPortal = 60C463801A01858B00DCB24F /* Project object */; 22 | proxyType = 1; 23 | remoteGlobalIDString = 60C463871A01858B00DCB24F; 24 | remoteInfo = Optionals; 25 | }; 26 | /* End PBXContainerItemProxy section */ 27 | 28 | /* Begin PBXFileReference section */ 29 | 60C463881A01858B00DCB24F /* Optionals.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Optionals.app; sourceTree = BUILT_PRODUCTS_DIR; }; 30 | 60C4638C1A01858B00DCB24F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 31 | 60C4638D1A01858B00DCB24F /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 32 | 60C4638F1A01858B00DCB24F /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 33 | 60C463921A01858B00DCB24F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 34 | 60C463941A01858B00DCB24F /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 35 | 60C463971A01858B00DCB24F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 36 | 60C4639D1A01858B00DCB24F /* OptionalsTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = OptionalsTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 37 | 60C463A21A01858B00DCB24F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 38 | 60C463A31A01858B00DCB24F /* OptionalsTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OptionalsTests.swift; sourceTree = ""; }; 39 | /* End PBXFileReference section */ 40 | 41 | /* Begin PBXFrameworksBuildPhase section */ 42 | 60C463851A01858B00DCB24F /* Frameworks */ = { 43 | isa = PBXFrameworksBuildPhase; 44 | buildActionMask = 2147483647; 45 | files = ( 46 | ); 47 | runOnlyForDeploymentPostprocessing = 0; 48 | }; 49 | 60C4639A1A01858B00DCB24F /* Frameworks */ = { 50 | isa = PBXFrameworksBuildPhase; 51 | buildActionMask = 2147483647; 52 | files = ( 53 | ); 54 | runOnlyForDeploymentPostprocessing = 0; 55 | }; 56 | /* End PBXFrameworksBuildPhase section */ 57 | 58 | /* Begin PBXGroup section */ 59 | 60C4637F1A01858B00DCB24F = { 60 | isa = PBXGroup; 61 | children = ( 62 | 60C4638A1A01858B00DCB24F /* Optionals */, 63 | 60C463A01A01858B00DCB24F /* OptionalsTests */, 64 | 60C463891A01858B00DCB24F /* Products */, 65 | ); 66 | sourceTree = ""; 67 | }; 68 | 60C463891A01858B00DCB24F /* Products */ = { 69 | isa = PBXGroup; 70 | children = ( 71 | 60C463881A01858B00DCB24F /* Optionals.app */, 72 | 60C4639D1A01858B00DCB24F /* OptionalsTests.xctest */, 73 | ); 74 | name = Products; 75 | sourceTree = ""; 76 | }; 77 | 60C4638A1A01858B00DCB24F /* Optionals */ = { 78 | isa = PBXGroup; 79 | children = ( 80 | 60C4638D1A01858B00DCB24F /* AppDelegate.swift */, 81 | 60C4638F1A01858B00DCB24F /* ViewController.swift */, 82 | 60C463911A01858B00DCB24F /* Main.storyboard */, 83 | 60C463941A01858B00DCB24F /* Images.xcassets */, 84 | 60C463961A01858B00DCB24F /* LaunchScreen.xib */, 85 | 60C4638B1A01858B00DCB24F /* Supporting Files */, 86 | ); 87 | path = Optionals; 88 | sourceTree = ""; 89 | }; 90 | 60C4638B1A01858B00DCB24F /* Supporting Files */ = { 91 | isa = PBXGroup; 92 | children = ( 93 | 60C4638C1A01858B00DCB24F /* Info.plist */, 94 | ); 95 | name = "Supporting Files"; 96 | sourceTree = ""; 97 | }; 98 | 60C463A01A01858B00DCB24F /* OptionalsTests */ = { 99 | isa = PBXGroup; 100 | children = ( 101 | 60C463A31A01858B00DCB24F /* OptionalsTests.swift */, 102 | 60C463A11A01858B00DCB24F /* Supporting Files */, 103 | ); 104 | path = OptionalsTests; 105 | sourceTree = ""; 106 | }; 107 | 60C463A11A01858B00DCB24F /* Supporting Files */ = { 108 | isa = PBXGroup; 109 | children = ( 110 | 60C463A21A01858B00DCB24F /* Info.plist */, 111 | ); 112 | name = "Supporting Files"; 113 | sourceTree = ""; 114 | }; 115 | /* End PBXGroup section */ 116 | 117 | /* Begin PBXNativeTarget section */ 118 | 60C463871A01858B00DCB24F /* Optionals */ = { 119 | isa = PBXNativeTarget; 120 | buildConfigurationList = 60C463A71A01858B00DCB24F /* Build configuration list for PBXNativeTarget "Optionals" */; 121 | buildPhases = ( 122 | 60C463841A01858B00DCB24F /* Sources */, 123 | 60C463851A01858B00DCB24F /* Frameworks */, 124 | 60C463861A01858B00DCB24F /* Resources */, 125 | ); 126 | buildRules = ( 127 | ); 128 | dependencies = ( 129 | ); 130 | name = Optionals; 131 | productName = Optionals; 132 | productReference = 60C463881A01858B00DCB24F /* Optionals.app */; 133 | productType = "com.apple.product-type.application"; 134 | }; 135 | 60C4639C1A01858B00DCB24F /* OptionalsTests */ = { 136 | isa = PBXNativeTarget; 137 | buildConfigurationList = 60C463AA1A01858B00DCB24F /* Build configuration list for PBXNativeTarget "OptionalsTests" */; 138 | buildPhases = ( 139 | 60C463991A01858B00DCB24F /* Sources */, 140 | 60C4639A1A01858B00DCB24F /* Frameworks */, 141 | 60C4639B1A01858B00DCB24F /* Resources */, 142 | ); 143 | buildRules = ( 144 | ); 145 | dependencies = ( 146 | 60C4639F1A01858B00DCB24F /* PBXTargetDependency */, 147 | ); 148 | name = OptionalsTests; 149 | productName = OptionalsTests; 150 | productReference = 60C4639D1A01858B00DCB24F /* OptionalsTests.xctest */; 151 | productType = "com.apple.product-type.bundle.unit-test"; 152 | }; 153 | /* End PBXNativeTarget section */ 154 | 155 | /* Begin PBXProject section */ 156 | 60C463801A01858B00DCB24F /* Project object */ = { 157 | isa = PBXProject; 158 | attributes = { 159 | LastUpgradeCheck = 0610; 160 | ORGANIZATIONNAME = "Lee Brimelow"; 161 | TargetAttributes = { 162 | 60C463871A01858B00DCB24F = { 163 | CreatedOnToolsVersion = 6.1; 164 | }; 165 | 60C4639C1A01858B00DCB24F = { 166 | CreatedOnToolsVersion = 6.1; 167 | TestTargetID = 60C463871A01858B00DCB24F; 168 | }; 169 | }; 170 | }; 171 | buildConfigurationList = 60C463831A01858B00DCB24F /* Build configuration list for PBXProject "Optionals" */; 172 | compatibilityVersion = "Xcode 3.2"; 173 | developmentRegion = English; 174 | hasScannedForEncodings = 0; 175 | knownRegions = ( 176 | en, 177 | Base, 178 | ); 179 | mainGroup = 60C4637F1A01858B00DCB24F; 180 | productRefGroup = 60C463891A01858B00DCB24F /* Products */; 181 | projectDirPath = ""; 182 | projectRoot = ""; 183 | targets = ( 184 | 60C463871A01858B00DCB24F /* Optionals */, 185 | 60C4639C1A01858B00DCB24F /* OptionalsTests */, 186 | ); 187 | }; 188 | /* End PBXProject section */ 189 | 190 | /* Begin PBXResourcesBuildPhase section */ 191 | 60C463861A01858B00DCB24F /* Resources */ = { 192 | isa = PBXResourcesBuildPhase; 193 | buildActionMask = 2147483647; 194 | files = ( 195 | 60C463931A01858B00DCB24F /* Main.storyboard in Resources */, 196 | 60C463981A01858B00DCB24F /* LaunchScreen.xib in Resources */, 197 | 60C463951A01858B00DCB24F /* Images.xcassets in Resources */, 198 | ); 199 | runOnlyForDeploymentPostprocessing = 0; 200 | }; 201 | 60C4639B1A01858B00DCB24F /* Resources */ = { 202 | isa = PBXResourcesBuildPhase; 203 | buildActionMask = 2147483647; 204 | files = ( 205 | ); 206 | runOnlyForDeploymentPostprocessing = 0; 207 | }; 208 | /* End PBXResourcesBuildPhase section */ 209 | 210 | /* Begin PBXSourcesBuildPhase section */ 211 | 60C463841A01858B00DCB24F /* Sources */ = { 212 | isa = PBXSourcesBuildPhase; 213 | buildActionMask = 2147483647; 214 | files = ( 215 | 60C463901A01858B00DCB24F /* ViewController.swift in Sources */, 216 | 60C4638E1A01858B00DCB24F /* AppDelegate.swift in Sources */, 217 | ); 218 | runOnlyForDeploymentPostprocessing = 0; 219 | }; 220 | 60C463991A01858B00DCB24F /* Sources */ = { 221 | isa = PBXSourcesBuildPhase; 222 | buildActionMask = 2147483647; 223 | files = ( 224 | 60C463A41A01858B00DCB24F /* OptionalsTests.swift in Sources */, 225 | ); 226 | runOnlyForDeploymentPostprocessing = 0; 227 | }; 228 | /* End PBXSourcesBuildPhase section */ 229 | 230 | /* Begin PBXTargetDependency section */ 231 | 60C4639F1A01858B00DCB24F /* PBXTargetDependency */ = { 232 | isa = PBXTargetDependency; 233 | target = 60C463871A01858B00DCB24F /* Optionals */; 234 | targetProxy = 60C4639E1A01858B00DCB24F /* PBXContainerItemProxy */; 235 | }; 236 | /* End PBXTargetDependency section */ 237 | 238 | /* Begin PBXVariantGroup section */ 239 | 60C463911A01858B00DCB24F /* Main.storyboard */ = { 240 | isa = PBXVariantGroup; 241 | children = ( 242 | 60C463921A01858B00DCB24F /* Base */, 243 | ); 244 | name = Main.storyboard; 245 | sourceTree = ""; 246 | }; 247 | 60C463961A01858B00DCB24F /* LaunchScreen.xib */ = { 248 | isa = PBXVariantGroup; 249 | children = ( 250 | 60C463971A01858B00DCB24F /* Base */, 251 | ); 252 | name = LaunchScreen.xib; 253 | sourceTree = ""; 254 | }; 255 | /* End PBXVariantGroup section */ 256 | 257 | /* Begin XCBuildConfiguration section */ 258 | 60C463A51A01858B00DCB24F /* Debug */ = { 259 | isa = XCBuildConfiguration; 260 | buildSettings = { 261 | ALWAYS_SEARCH_USER_PATHS = NO; 262 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 263 | CLANG_CXX_LIBRARY = "libc++"; 264 | CLANG_ENABLE_MODULES = YES; 265 | CLANG_ENABLE_OBJC_ARC = YES; 266 | CLANG_WARN_BOOL_CONVERSION = YES; 267 | CLANG_WARN_CONSTANT_CONVERSION = YES; 268 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 269 | CLANG_WARN_EMPTY_BODY = YES; 270 | CLANG_WARN_ENUM_CONVERSION = YES; 271 | CLANG_WARN_INT_CONVERSION = YES; 272 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 273 | CLANG_WARN_UNREACHABLE_CODE = YES; 274 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 275 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 276 | COPY_PHASE_STRIP = NO; 277 | ENABLE_STRICT_OBJC_MSGSEND = YES; 278 | GCC_C_LANGUAGE_STANDARD = gnu99; 279 | GCC_DYNAMIC_NO_PIC = NO; 280 | GCC_OPTIMIZATION_LEVEL = 0; 281 | GCC_PREPROCESSOR_DEFINITIONS = ( 282 | "DEBUG=1", 283 | "$(inherited)", 284 | ); 285 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 286 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 287 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 288 | GCC_WARN_UNDECLARED_SELECTOR = YES; 289 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 290 | GCC_WARN_UNUSED_FUNCTION = YES; 291 | GCC_WARN_UNUSED_VARIABLE = YES; 292 | IPHONEOS_DEPLOYMENT_TARGET = 8.1; 293 | MTL_ENABLE_DEBUG_INFO = YES; 294 | ONLY_ACTIVE_ARCH = YES; 295 | SDKROOT = iphoneos; 296 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 297 | TARGETED_DEVICE_FAMILY = "1,2"; 298 | }; 299 | name = Debug; 300 | }; 301 | 60C463A61A01858B00DCB24F /* Release */ = { 302 | isa = XCBuildConfiguration; 303 | buildSettings = { 304 | ALWAYS_SEARCH_USER_PATHS = NO; 305 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 306 | CLANG_CXX_LIBRARY = "libc++"; 307 | CLANG_ENABLE_MODULES = YES; 308 | CLANG_ENABLE_OBJC_ARC = YES; 309 | CLANG_WARN_BOOL_CONVERSION = YES; 310 | CLANG_WARN_CONSTANT_CONVERSION = YES; 311 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 312 | CLANG_WARN_EMPTY_BODY = YES; 313 | CLANG_WARN_ENUM_CONVERSION = YES; 314 | CLANG_WARN_INT_CONVERSION = YES; 315 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 316 | CLANG_WARN_UNREACHABLE_CODE = YES; 317 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 318 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 319 | COPY_PHASE_STRIP = YES; 320 | ENABLE_NS_ASSERTIONS = NO; 321 | ENABLE_STRICT_OBJC_MSGSEND = YES; 322 | GCC_C_LANGUAGE_STANDARD = gnu99; 323 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 324 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 325 | GCC_WARN_UNDECLARED_SELECTOR = YES; 326 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 327 | GCC_WARN_UNUSED_FUNCTION = YES; 328 | GCC_WARN_UNUSED_VARIABLE = YES; 329 | IPHONEOS_DEPLOYMENT_TARGET = 8.1; 330 | MTL_ENABLE_DEBUG_INFO = NO; 331 | SDKROOT = iphoneos; 332 | TARGETED_DEVICE_FAMILY = "1,2"; 333 | VALIDATE_PRODUCT = YES; 334 | }; 335 | name = Release; 336 | }; 337 | 60C463A81A01858B00DCB24F /* Debug */ = { 338 | isa = XCBuildConfiguration; 339 | buildSettings = { 340 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 341 | INFOPLIST_FILE = Optionals/Info.plist; 342 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 343 | PRODUCT_NAME = "$(TARGET_NAME)"; 344 | }; 345 | name = Debug; 346 | }; 347 | 60C463A91A01858B00DCB24F /* Release */ = { 348 | isa = XCBuildConfiguration; 349 | buildSettings = { 350 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 351 | INFOPLIST_FILE = Optionals/Info.plist; 352 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 353 | PRODUCT_NAME = "$(TARGET_NAME)"; 354 | }; 355 | name = Release; 356 | }; 357 | 60C463AB1A01858B00DCB24F /* Debug */ = { 358 | isa = XCBuildConfiguration; 359 | buildSettings = { 360 | BUNDLE_LOADER = "$(TEST_HOST)"; 361 | FRAMEWORK_SEARCH_PATHS = ( 362 | "$(SDKROOT)/Developer/Library/Frameworks", 363 | "$(inherited)", 364 | ); 365 | GCC_PREPROCESSOR_DEFINITIONS = ( 366 | "DEBUG=1", 367 | "$(inherited)", 368 | ); 369 | INFOPLIST_FILE = OptionalsTests/Info.plist; 370 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 371 | PRODUCT_NAME = "$(TARGET_NAME)"; 372 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Optionals.app/Optionals"; 373 | }; 374 | name = Debug; 375 | }; 376 | 60C463AC1A01858B00DCB24F /* Release */ = { 377 | isa = XCBuildConfiguration; 378 | buildSettings = { 379 | BUNDLE_LOADER = "$(TEST_HOST)"; 380 | FRAMEWORK_SEARCH_PATHS = ( 381 | "$(SDKROOT)/Developer/Library/Frameworks", 382 | "$(inherited)", 383 | ); 384 | INFOPLIST_FILE = OptionalsTests/Info.plist; 385 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 386 | PRODUCT_NAME = "$(TARGET_NAME)"; 387 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Optionals.app/Optionals"; 388 | }; 389 | name = Release; 390 | }; 391 | /* End XCBuildConfiguration section */ 392 | 393 | /* Begin XCConfigurationList section */ 394 | 60C463831A01858B00DCB24F /* Build configuration list for PBXProject "Optionals" */ = { 395 | isa = XCConfigurationList; 396 | buildConfigurations = ( 397 | 60C463A51A01858B00DCB24F /* Debug */, 398 | 60C463A61A01858B00DCB24F /* Release */, 399 | ); 400 | defaultConfigurationIsVisible = 0; 401 | defaultConfigurationName = Release; 402 | }; 403 | 60C463A71A01858B00DCB24F /* Build configuration list for PBXNativeTarget "Optionals" */ = { 404 | isa = XCConfigurationList; 405 | buildConfigurations = ( 406 | 60C463A81A01858B00DCB24F /* Debug */, 407 | 60C463A91A01858B00DCB24F /* Release */, 408 | ); 409 | defaultConfigurationIsVisible = 0; 410 | }; 411 | 60C463AA1A01858B00DCB24F /* Build configuration list for PBXNativeTarget "OptionalsTests" */ = { 412 | isa = XCConfigurationList; 413 | buildConfigurations = ( 414 | 60C463AB1A01858B00DCB24F /* Debug */, 415 | 60C463AC1A01858B00DCB24F /* Release */, 416 | ); 417 | defaultConfigurationIsVisible = 0; 418 | }; 419 | /* End XCConfigurationList section */ 420 | }; 421 | rootObject = 60C463801A01858B00DCB24F /* Project object */; 422 | } 423 | -------------------------------------------------------------------------------- /Optionals/Optionals.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Optionals/Optionals.xcodeproj/project.xcworkspace/xcshareddata/Optionals.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | 6936AA82-762E-439A-AD41-7EC658B91B9B 9 | IDESourceControlProjectName 10 | Optionals 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | 366CA4AA6B486F114DE3688D25A5A3EA372929BE 14 | https://github.com/brimelow/Swift-Video-Tutorials.git 15 | 16 | IDESourceControlProjectPath 17 | Optionals/Optionals.xcodeproj 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | 366CA4AA6B486F114DE3688D25A5A3EA372929BE 21 | ../../.. 22 | 23 | IDESourceControlProjectURL 24 | https://github.com/brimelow/Swift-Video-Tutorials.git 25 | IDESourceControlProjectVersion 26 | 111 27 | IDESourceControlProjectWCCIdentifier 28 | 366CA4AA6B486F114DE3688D25A5A3EA372929BE 29 | IDESourceControlProjectWCConfigurations 30 | 31 | 32 | IDESourceControlRepositoryExtensionIdentifierKey 33 | public.vcs.git 34 | IDESourceControlWCCIdentifierKey 35 | 366CA4AA6B486F114DE3688D25A5A3EA372929BE 36 | IDESourceControlWCCName 37 | Swift%20Video%20Tutorials 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /Optionals/Optionals.xcodeproj/project.xcworkspace/xcuserdata/brimelow.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brimelow/Swift-Video-Tutorials/0b65a3f79a2ac4745aea5f113046ec88adda87e0/Optionals/Optionals.xcodeproj/project.xcworkspace/xcuserdata/brimelow.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /Optionals/Optionals.xcodeproj/xcuserdata/brimelow.xcuserdatad/xcschemes/Optionals.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 47 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 65 | 66 | 75 | 76 | 82 | 83 | 84 | 85 | 86 | 87 | 93 | 94 | 100 | 101 | 102 | 103 | 105 | 106 | 109 | 110 | 111 | -------------------------------------------------------------------------------- /Optionals/Optionals.xcodeproj/xcuserdata/brimelow.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Optionals.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 60C463871A01858B00DCB24F 16 | 17 | primary 18 | 19 | 20 | 60C4639C1A01858B00DCB24F 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Optionals/Optionals/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // Optionals 4 | // 5 | // Created by Lee Brimelow on 10/29/14. 6 | // Copyright (c) 2014 Lee Brimelow. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(application: UIApplication) { 23 | // 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. 24 | // 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. 25 | } 26 | 27 | func applicationDidEnterBackground(application: UIApplication) { 28 | // 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. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(application: UIApplication) { 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 | func applicationDidBecomeActive(application: UIApplication) { 37 | // 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. 38 | } 39 | 40 | func applicationWillTerminate(application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /Optionals/Optionals/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 20 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /Optionals/Optionals/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 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /Optionals/Optionals/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" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /Optionals/Optionals/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | com.leebrimelow.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | UISupportedInterfaceOrientations~ipad 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationPortraitUpsideDown 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /Optionals/Optionals/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // Optionals 4 | // 5 | // Created by Lee Brimelow on 10/29/14. 6 | // Copyright (c) 2014 Lee Brimelow. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ViewController: UIViewController { 12 | 13 | var imageView: UIImageView? 14 | 15 | override func viewDidLoad() { 16 | super.viewDidLoad() 17 | 18 | //imageView = UIImageView() 19 | 20 | //var scale = imageView?.image?.scale 21 | 22 | 23 | } 24 | 25 | } 26 | 27 | -------------------------------------------------------------------------------- /Optionals/OptionalsTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | com.leebrimelow.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /Optionals/OptionalsTests/OptionalsTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // OptionalsTests.swift 3 | // OptionalsTests 4 | // 5 | // Created by Lee Brimelow on 10/29/14. 6 | // Copyright (c) 2014 Lee Brimelow. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import XCTest 11 | 12 | class OptionalsTests: XCTestCase { 13 | 14 | override func setUp() { 15 | super.setUp() 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | } 18 | 19 | override func tearDown() { 20 | // Put teardown code here. This method is called after the invocation of each test method in the class. 21 | super.tearDown() 22 | } 23 | 24 | func testExample() { 25 | // This is an example of a functional test case. 26 | XCTAssert(true, "Pass") 27 | } 28 | 29 | func testPerformanceExample() { 30 | // This is an example of a performance test case. 31 | self.measureBlock() { 32 | // Put the code you want to measure the time of here. 33 | } 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Swift-Video-Tutorials 2 | ===================== 3 | 4 | Code used on http://swiftvideotutorials.com 5 | --------------------------------------------------------------------------------