diff --git a/Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC.xcodeproj/project.pbxproj b/Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC.xcodeproj/project.pbxproj new file mode 100644 index 00000000..152fe0e2 --- /dev/null +++ b/Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC.xcodeproj/project.pbxproj @@ -0,0 +1,400 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXBuildFile section */ + AB59BD4022288F7600190925 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = AB59BD3F22288F7600190925 /* AppDelegate.m */; }; + AB59BD4622288F7600190925 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = AB59BD4422288F7600190925 /* Main.storyboard */; }; + AB59BD4822288F7700190925 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = AB59BD4722288F7700190925 /* Assets.xcassets */; }; + AB59BD4B22288F7700190925 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = AB59BD4922288F7700190925 /* LaunchScreen.storyboard */; }; + AB59BD4E22288F7700190925 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = AB59BD4D22288F7700190925 /* main.m */; }; + AB59BD562228924B00190925 /* CalculatorViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = AB59BD552228924B00190925 /* CalculatorViewController.m */; }; + AB59BD5A222893F600190925 /* JKStack.m in Sources */ = {isa = PBXBuildFile; fileRef = AB59BD59222893F600190925 /* JKStack.m */; }; + AB59BD5E2228942C00190925 /* JKCalculator.m in Sources */ = {isa = PBXBuildFile; fileRef = AB59BD5D2228942C00190925 /* JKCalculator.m */; }; + AB59BD632228953A00190925 /* JKDigitAccumulator.m in Sources */ = {isa = PBXBuildFile; fileRef = AB59BD622228953A00190925 /* JKDigitAccumulator.m */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + AB59BD3B22288F7600190925 /* RPNCalculator-ObjC.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "RPNCalculator-ObjC.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + AB59BD3E22288F7600190925 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + AB59BD3F22288F7600190925 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + AB59BD4522288F7600190925 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + AB59BD4722288F7700190925 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + AB59BD4A22288F7700190925 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + AB59BD4C22288F7700190925 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + AB59BD4D22288F7700190925 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + AB59BD542228924B00190925 /* CalculatorViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CalculatorViewController.h; sourceTree = ""; }; + AB59BD552228924B00190925 /* CalculatorViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CalculatorViewController.m; sourceTree = ""; }; + AB59BD58222893F600190925 /* JKStack.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JKStack.h; sourceTree = ""; }; + AB59BD59222893F600190925 /* JKStack.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = JKStack.m; sourceTree = ""; }; + AB59BD5C2228942C00190925 /* JKCalculator.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JKCalculator.h; sourceTree = ""; }; + AB59BD5D2228942C00190925 /* JKCalculator.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = JKCalculator.m; sourceTree = ""; }; + AB59BD612228953A00190925 /* JKDigitAccumulator.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JKDigitAccumulator.h; sourceTree = ""; }; + AB59BD622228953A00190925 /* JKDigitAccumulator.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = JKDigitAccumulator.m; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + AB59BD3822288F7600190925 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + AB59BD3222288F7600190925 = { + isa = PBXGroup; + children = ( + AB59BD3D22288F7600190925 /* RPNCalculator-ObjC */, + AB59BD3C22288F7600190925 /* Products */, + ); + sourceTree = ""; + }; + AB59BD3C22288F7600190925 /* Products */ = { + isa = PBXGroup; + children = ( + AB59BD3B22288F7600190925 /* RPNCalculator-ObjC.app */, + ); + name = Products; + sourceTree = ""; + }; + AB59BD3D22288F7600190925 /* RPNCalculator-ObjC */ = { + isa = PBXGroup; + children = ( + AB59BD3E22288F7600190925 /* AppDelegate.h */, + AB59BD3F22288F7600190925 /* AppDelegate.m */, + AB59BD5F2228943C00190925 /* Model Controller */, + AB59BD5B222893FC00190925 /* Models */, + AB59BD572228925000190925 /* View Controller */, + AB59BD4422288F7600190925 /* Main.storyboard */, + AB59BD4722288F7700190925 /* Assets.xcassets */, + AB59BD4922288F7700190925 /* LaunchScreen.storyboard */, + AB59BD4C22288F7700190925 /* Info.plist */, + AB59BD4D22288F7700190925 /* main.m */, + ); + path = "RPNCalculator-ObjC"; + sourceTree = ""; + }; + AB59BD572228925000190925 /* View Controller */ = { + isa = PBXGroup; + children = ( + AB59BD542228924B00190925 /* CalculatorViewController.h */, + AB59BD552228924B00190925 /* CalculatorViewController.m */, + ); + path = "View Controller"; + sourceTree = ""; + }; + AB59BD5B222893FC00190925 /* Models */ = { + isa = PBXGroup; + children = ( + AB59BD602228951700190925 /* JKStack */, + AB59BD642228953E00190925 /* JKDigitAccumulator */, + ); + path = Models; + sourceTree = ""; + }; + AB59BD5F2228943C00190925 /* Model Controller */ = { + isa = PBXGroup; + children = ( + AB59BD5C2228942C00190925 /* JKCalculator.h */, + AB59BD5D2228942C00190925 /* JKCalculator.m */, + ); + path = "Model Controller"; + sourceTree = ""; + }; + AB59BD602228951700190925 /* JKStack */ = { + isa = PBXGroup; + children = ( + AB59BD58222893F600190925 /* JKStack.h */, + AB59BD59222893F600190925 /* JKStack.m */, + ); + path = JKStack; + sourceTree = ""; + }; + AB59BD642228953E00190925 /* JKDigitAccumulator */ = { + isa = PBXGroup; + children = ( + AB59BD612228953A00190925 /* JKDigitAccumulator.h */, + AB59BD622228953A00190925 /* JKDigitAccumulator.m */, + ); + path = JKDigitAccumulator; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + AB59BD3A22288F7600190925 /* RPNCalculator-ObjC */ = { + isa = PBXNativeTarget; + buildConfigurationList = AB59BD5122288F7700190925 /* Build configuration list for PBXNativeTarget "RPNCalculator-ObjC" */; + buildPhases = ( + AB59BD3722288F7600190925 /* Sources */, + AB59BD3822288F7600190925 /* Frameworks */, + AB59BD3922288F7600190925 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "RPNCalculator-ObjC"; + productName = "RPNCalculator-ObjC"; + productReference = AB59BD3B22288F7600190925 /* RPNCalculator-ObjC.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + AB59BD3322288F7600190925 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 1010; + ORGANIZATIONNAME = jkaunert; + TargetAttributes = { + AB59BD3A22288F7600190925 = { + CreatedOnToolsVersion = 10.1; + }; + }; + }; + buildConfigurationList = AB59BD3622288F7600190925 /* Build configuration list for PBXProject "RPNCalculator-ObjC" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = AB59BD3222288F7600190925; + productRefGroup = AB59BD3C22288F7600190925 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + AB59BD3A22288F7600190925 /* RPNCalculator-ObjC */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + AB59BD3922288F7600190925 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + AB59BD4B22288F7700190925 /* LaunchScreen.storyboard in Resources */, + AB59BD4822288F7700190925 /* Assets.xcassets in Resources */, + AB59BD4622288F7600190925 /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + AB59BD3722288F7600190925 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + AB59BD5E2228942C00190925 /* JKCalculator.m in Sources */, + AB59BD632228953A00190925 /* JKDigitAccumulator.m in Sources */, + AB59BD4E22288F7700190925 /* main.m in Sources */, + AB59BD4022288F7600190925 /* AppDelegate.m in Sources */, + AB59BD562228924B00190925 /* CalculatorViewController.m in Sources */, + AB59BD5A222893F600190925 /* JKStack.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + AB59BD4422288F7600190925 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + AB59BD4522288F7600190925 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + AB59BD4922288F7700190925 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + AB59BD4A22288F7700190925 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + AB59BD4F22288F7700190925 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.1; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + }; + name = Debug; + }; + AB59BD5022288F7700190925 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.1; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + AB59BD5222288F7700190925 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = HSRQC9N69B; + INFOPLIST_FILE = "RPNCalculator-ObjC/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.jkaunert.RPNCalculator-ObjC"; + PRODUCT_NAME = "$(TARGET_NAME)"; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + AB59BD5322288F7700190925 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = HSRQC9N69B; + INFOPLIST_FILE = "RPNCalculator-ObjC/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.jkaunert.RPNCalculator-ObjC"; + PRODUCT_NAME = "$(TARGET_NAME)"; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + AB59BD3622288F7600190925 /* Build configuration list for PBXProject "RPNCalculator-ObjC" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + AB59BD4F22288F7700190925 /* Debug */, + AB59BD5022288F7700190925 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + AB59BD5122288F7700190925 /* Build configuration list for PBXNativeTarget "RPNCalculator-ObjC" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + AB59BD5222288F7700190925 /* Debug */, + AB59BD5322288F7700190925 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = AB59BD3322288F7600190925 /* Project object */; +} diff --git a/Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC/AppDelegate.h b/Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC/AppDelegate.h new file mode 100644 index 00000000..24bb1cc4 --- /dev/null +++ b/Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC/AppDelegate.h @@ -0,0 +1,17 @@ +// +// AppDelegate.h +// RPNCalculator-ObjC +// +// Created by TuneUp Shop on 2/28/19. +// Copyright © 2019 jkaunert. All rights reserved. +// + +#import + +@interface AppDelegate : UIResponder + +@property (strong, nonatomic) UIWindow *window; + + +@end + diff --git a/Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC/AppDelegate.m b/Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC/AppDelegate.m new file mode 100644 index 00000000..810bfd07 --- /dev/null +++ b/Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC/AppDelegate.m @@ -0,0 +1,51 @@ +// +// AppDelegate.m +// RPNCalculator-ObjC +// +// Created by TuneUp Shop on 2/28/19. +// Copyright © 2019 jkaunert. All rights reserved. +// + +#import "AppDelegate.h" + +@interface AppDelegate () + +@end + +@implementation AppDelegate + + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + // Override point for customization after application launch. + return YES; +} + + +- (void)applicationWillResignActive:(UIApplication *)application { + // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. +} + + +- (void)applicationDidEnterBackground:(UIApplication *)application { + // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. +} + + +- (void)applicationWillEnterForeground:(UIApplication *)application { + // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. +} + + +- (void)applicationDidBecomeActive:(UIApplication *)application { + // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. +} + + +- (void)applicationWillTerminate:(UIApplication *)application { + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. +} + + +@end diff --git a/Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC/Assets.xcassets/AppIcon.appiconset/Contents.json b/Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000..d8db8d65 --- /dev/null +++ b/Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,98 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "83.5x83.5", + "scale" : "2x" + }, + { + "idiom" : "ios-marketing", + "size" : "1024x1024", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC/Assets.xcassets/Contents.json b/Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC/Assets.xcassets/Contents.json new file mode 100644 index 00000000..da4a164c --- /dev/null +++ b/Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC/Base.lproj/LaunchScreen.storyboard b/Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 00000000..bfa36129 --- /dev/null +++ b/Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC/Base.lproj/Main.storyboard b/Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC/Base.lproj/Main.storyboard new file mode 100644 index 00000000..7edaf247 --- /dev/null +++ b/Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC/Base.lproj/Main.storyboard @@ -0,0 +1,146 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC/Info.plist b/Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC/Info.plist new file mode 100644 index 00000000..16be3b68 --- /dev/null +++ b/Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC/Info.plist @@ -0,0 +1,45 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC/Model Controller/JKCalculator.h b/Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC/Model Controller/JKCalculator.h new file mode 100644 index 00000000..d998fbce --- /dev/null +++ b/Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC/Model Controller/JKCalculator.h @@ -0,0 +1,34 @@ +// +// JKCalculator.h +// RPNCalculator-ObjC +// +// Created by TuneUp Shop on 2/28/19. +// Copyright © 2019 jkaunert. All rights reserved. +// + +#import +#import "JKStack.h" +#import "JKDigitAccumulator.h" + + + +typedef NS_ENUM(NSUInteger, RPNOperator) { + RPNOperatorAdd, + RPNOperatorSubtract, + RPNOperatorMultiply, + RPNOperatorDivide +}; + +@interface JKCalculator : NSObject + +@property(nonatomic, readonly) id topValue; + +- (void)pushNumber:(id)value; + +- (void)applyOperator:(RPNOperator)operator; + +- (void)clear; + +@end + + diff --git a/Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC/Model Controller/JKCalculator.m b/Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC/Model Controller/JKCalculator.m new file mode 100644 index 00000000..d7c23a1a --- /dev/null +++ b/Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC/Model Controller/JKCalculator.m @@ -0,0 +1,59 @@ +// +// JKCalculator.m +// RPNCalculator-ObjC +// +// Created by TuneUp Shop on 2/28/19. +// Copyright © 2019 jkaunert. All rights reserved. +// + +#import "JKCalculator.h" +#import "JKStack.h" +#import "JKDigitAccumulator.h" + +@interface JKCalculator () + +@property JKStack *stack; + +@end + +@implementation JKCalculator + + + +- (void)pushNumber:(id)value { + [_stack pushValue:value]; +} + +- (void)clear { + [_stack emptyStack]; +} + +- (id)getTopValue { + return [_stack peekValue]; +} + +- (void)applyOperator:(RPNOperator)operator { + + id rhs = [_stack popValue]; + id lhs = [_stack popValue]; + + id result; + switch (operator) { + + + case RPNOperatorAdd: + result = lhs + rhs; + break; + case RPNOperatorSubtract: + <#code#> + break; + case RPNOperatorMultiply: + <#code#> + break; + case RPNOperatorDivide: + <#code#> + break; + } +} + +@end diff --git a/Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC/Models/JKDigitAccumulator/JKDigitAccumulator.h b/Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC/Models/JKDigitAccumulator/JKDigitAccumulator.h new file mode 100644 index 00000000..e2864962 --- /dev/null +++ b/Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC/Models/JKDigitAccumulator/JKDigitAccumulator.h @@ -0,0 +1,17 @@ +// +// JKDigitAccumulator.h +// RPNCalculator-ObjC +// +// Created by TuneUp Shop on 2/28/19. +// Copyright © 2019 jkaunert. All rights reserved. +// + +#import + + + +@interface JKDigitAccumulator : NSObject + +@end + + diff --git a/Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC/Models/JKDigitAccumulator/JKDigitAccumulator.m b/Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC/Models/JKDigitAccumulator/JKDigitAccumulator.m new file mode 100644 index 00000000..ea088557 --- /dev/null +++ b/Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC/Models/JKDigitAccumulator/JKDigitAccumulator.m @@ -0,0 +1,13 @@ +// +// JKDigitAccumulator.m +// RPNCalculator-ObjC +// +// Created by TuneUp Shop on 2/28/19. +// Copyright © 2019 jkaunert. All rights reserved. +// + +#import "JKDigitAccumulator.h" + +@implementation JKDigitAccumulator + +@end diff --git a/Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC/Models/JKStack/JKStack.h b/Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC/Models/JKStack/JKStack.h new file mode 100644 index 00000000..2244ffb3 --- /dev/null +++ b/Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC/Models/JKStack/JKStack.h @@ -0,0 +1,27 @@ +// +// JKStack.h +// RPNCalculator-ObjC +// +// Created by TuneUp Shop on 2/28/19. +// Copyright © 2019 jkaunert. All rights reserved. +// + +#import + + + +@interface JKStack : NSObject + +- (instancetype)initWithArray:(NSArray *)array; + +- (void)pushValue:(id)value; + +- (instancetype)popValue; + +- (void)emptyStack; + +- (instancetype)peekValue; + +@end + + diff --git a/Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC/Models/JKStack/JKStack.m b/Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC/Models/JKStack/JKStack.m new file mode 100644 index 00000000..2bb18173 --- /dev/null +++ b/Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC/Models/JKStack/JKStack.m @@ -0,0 +1,56 @@ +// +// JKStack.m +// RPNCalculator-ObjC +// +// Created by TuneUp Shop on 2/28/19. +// Copyright © 2019 jkaunert. All rights reserved. +// + +#import "JKStack.h" + +@interface JKStack () +@property (nonatomic, strong) NSMutableArray *values; +@end + +@implementation JKStack + +@synthesize values = _values; + +- (instancetype)initWithArray:(NSArray *)array { + self = [super init]; + if (self != nil) { + _values = [[NSMutableArray alloc] initWithArray:array]; + } + return self; +} + +- (void)pushValue:(id)value { + if (value != nil) { + [_values addObject:value]; + } +} + +- (instancetype)popValue { + if (_values.count > 0) { + id value = [_values objectAtIndex:(_values.count - 1)]; + [_values removeLastObject]; + return value; + } + return nil; +} + +- (instancetype)peekValue { + if (_values.count > 0) { + id value = [_values objectAtIndex:(_values.count - 1)]; + return value; + } + return nil; +} + +- (void)emptyStack { + if (_values.count > 0) { + [_values removeAllObjects]; + } +} + +@end diff --git a/Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC/View Controller/CalculatorViewController.h b/Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC/View Controller/CalculatorViewController.h new file mode 100644 index 00000000..a4be03fb --- /dev/null +++ b/Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC/View Controller/CalculatorViewController.h @@ -0,0 +1,17 @@ +// +// CalculatorViewController.h +// RPNCalculator-ObjC +// +// Created by TuneUp Shop on 2/28/19. +// Copyright © 2019 jkaunert. All rights reserved. +// + +#import + + + +@interface CalculatorViewController : UIViewController + +@end + + diff --git a/Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC/View Controller/CalculatorViewController.m b/Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC/View Controller/CalculatorViewController.m new file mode 100644 index 00000000..c8b54eee --- /dev/null +++ b/Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC/View Controller/CalculatorViewController.m @@ -0,0 +1,32 @@ +// +// CalculatorViewController.m +// RPNCalculator-ObjC +// +// Created by TuneUp Shop on 2/28/19. +// Copyright © 2019 jkaunert. All rights reserved. +// + +#import "CalculatorViewController.h" + +@interface CalculatorViewController () + +@end + +@implementation CalculatorViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + // Do any additional setup after loading the view. +} + +/* +#pragma mark - Navigation + +// In a storyboard-based application, you will often want to do a little preparation before navigation +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { + // Get the new view controller using [segue destinationViewController]. + // Pass the selected object to the new view controller. +} +*/ + +@end diff --git a/Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC/main.m b/Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC/main.m new file mode 100644 index 00000000..79e293dc --- /dev/null +++ b/Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC/main.m @@ -0,0 +1,16 @@ +// +// main.m +// RPNCalculator-ObjC +// +// Created by TuneUp Shop on 2/28/19. +// Copyright © 2019 jkaunert. All rights reserved. +// + +#import +#import "AppDelegate.h" + +int main(int argc, char * argv[]) { + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); + } +} diff --git a/Sprint 12/Module 4/ContactsMRC/ContactsMRC.xcodeproj/project.pbxproj b/Sprint 12/Module 4/ContactsMRC/ContactsMRC.xcodeproj/project.pbxproj new file mode 100644 index 00000000..b1e2efc5 --- /dev/null +++ b/Sprint 12/Module 4/ContactsMRC/ContactsMRC.xcodeproj/project.pbxproj @@ -0,0 +1,384 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXBuildFile section */ + AB59BEBD223093C500190925 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = AB59BEBB223093C500190925 /* Main.storyboard */; }; + AB59BEBF223093C600190925 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = AB59BEBE223093C600190925 /* Assets.xcassets */; }; + AB59BEC2223093C600190925 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = AB59BEC0223093C600190925 /* LaunchScreen.storyboard */; }; + AB59BEC5223093C600190925 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = AB59BEC4223093C600190925 /* main.m */; }; + AB59BECD2231651500190925 /* JKContactsTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = AB59BECC2231651500190925 /* JKContactsTableViewController.m */; }; + AB59BED12231656800190925 /* JKContactDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = AB59BED02231656800190925 /* JKContactDetailViewController.m */; }; + AB59BED42231659500190925 /* JKContactsController.m in Sources */ = {isa = PBXBuildFile; fileRef = AB59BED32231659500190925 /* JKContactsController.m */; }; + AB59BED82231662B00190925 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = AB59BED62231662B00190925 /* AppDelegate.m */; }; + AB59BEDB223166A600190925 /* JKContact.m in Sources */ = {isa = PBXBuildFile; fileRef = AB59BEDA223166A600190925 /* JKContact.m */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + AB59BEB2223093C500190925 /* ContactsMRC.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ContactsMRC.app; sourceTree = BUILT_PRODUCTS_DIR; }; + AB59BEBC223093C500190925 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + AB59BEBE223093C600190925 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + AB59BEC1223093C600190925 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + AB59BEC3223093C600190925 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + AB59BEC4223093C600190925 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + AB59BECB2231651500190925 /* JKContactsTableViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JKContactsTableViewController.h; sourceTree = ""; }; + AB59BECC2231651500190925 /* JKContactsTableViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = JKContactsTableViewController.m; sourceTree = ""; }; + AB59BECF2231656800190925 /* JKContactDetailViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JKContactDetailViewController.h; sourceTree = ""; }; + AB59BED02231656800190925 /* JKContactDetailViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = JKContactDetailViewController.m; sourceTree = ""; }; + AB59BED22231659500190925 /* JKContactsController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JKContactsController.h; sourceTree = ""; }; + AB59BED32231659500190925 /* JKContactsController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = JKContactsController.m; sourceTree = ""; }; + AB59BED62231662B00190925 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + AB59BED72231662B00190925 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + AB59BED9223166A600190925 /* JKContact.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JKContact.h; sourceTree = ""; }; + AB59BEDA223166A600190925 /* JKContact.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = JKContact.m; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + AB59BEAF223093C500190925 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + AB59BEA9223093C500190925 = { + isa = PBXGroup; + children = ( + AB59BEB4223093C500190925 /* ContactsMRC */, + AB59BEB3223093C500190925 /* Products */, + ); + sourceTree = ""; + }; + AB59BEB3223093C500190925 /* Products */ = { + isa = PBXGroup; + children = ( + AB59BEB2223093C500190925 /* ContactsMRC.app */, + ); + name = Products; + sourceTree = ""; + }; + AB59BEB4223093C500190925 /* ContactsMRC */ = { + isa = PBXGroup; + children = ( + AB59BED72231662B00190925 /* AppDelegate.h */, + AB59BED62231662B00190925 /* AppDelegate.m */, + AB59BEDC223166AC00190925 /* Model */, + AB59BED52231659C00190925 /* Model Controller */, + AB59BECE2231652300190925 /* View Controllers */, + AB59BEBB223093C500190925 /* Main.storyboard */, + AB59BEBE223093C600190925 /* Assets.xcassets */, + AB59BEC0223093C600190925 /* LaunchScreen.storyboard */, + AB59BEC3223093C600190925 /* Info.plist */, + AB59BEC4223093C600190925 /* main.m */, + ); + path = ContactsMRC; + sourceTree = ""; + }; + AB59BECE2231652300190925 /* View Controllers */ = { + isa = PBXGroup; + children = ( + AB59BECB2231651500190925 /* JKContactsTableViewController.h */, + AB59BECC2231651500190925 /* JKContactsTableViewController.m */, + AB59BECF2231656800190925 /* JKContactDetailViewController.h */, + AB59BED02231656800190925 /* JKContactDetailViewController.m */, + ); + path = "View Controllers"; + sourceTree = ""; + }; + AB59BED52231659C00190925 /* Model Controller */ = { + isa = PBXGroup; + children = ( + AB59BED22231659500190925 /* JKContactsController.h */, + AB59BED32231659500190925 /* JKContactsController.m */, + ); + path = "Model Controller"; + sourceTree = ""; + }; + AB59BEDC223166AC00190925 /* Model */ = { + isa = PBXGroup; + children = ( + AB59BED9223166A600190925 /* JKContact.h */, + AB59BEDA223166A600190925 /* JKContact.m */, + ); + path = Model; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + AB59BEB1223093C500190925 /* ContactsMRC */ = { + isa = PBXNativeTarget; + buildConfigurationList = AB59BEC8223093C600190925 /* Build configuration list for PBXNativeTarget "ContactsMRC" */; + buildPhases = ( + AB59BEAE223093C500190925 /* Sources */, + AB59BEAF223093C500190925 /* Frameworks */, + AB59BEB0223093C500190925 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = ContactsMRC; + productName = ContactsMRC; + productReference = AB59BEB2223093C500190925 /* ContactsMRC.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + AB59BEAA223093C500190925 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 1010; + ORGANIZATIONNAME = jkaunert; + TargetAttributes = { + AB59BEB1223093C500190925 = { + CreatedOnToolsVersion = 10.1; + }; + }; + }; + buildConfigurationList = AB59BEAD223093C500190925 /* Build configuration list for PBXProject "ContactsMRC" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = AB59BEA9223093C500190925; + productRefGroup = AB59BEB3223093C500190925 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + AB59BEB1223093C500190925 /* ContactsMRC */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + AB59BEB0223093C500190925 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + AB59BEC2223093C600190925 /* LaunchScreen.storyboard in Resources */, + AB59BEBF223093C600190925 /* Assets.xcassets in Resources */, + AB59BEBD223093C500190925 /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + AB59BEAE223093C500190925 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + AB59BEC5223093C600190925 /* main.m in Sources */, + AB59BEDB223166A600190925 /* JKContact.m in Sources */, + AB59BED42231659500190925 /* JKContactsController.m in Sources */, + AB59BECD2231651500190925 /* JKContactsTableViewController.m in Sources */, + AB59BED12231656800190925 /* JKContactDetailViewController.m in Sources */, + AB59BED82231662B00190925 /* AppDelegate.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + AB59BEBB223093C500190925 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + AB59BEBC223093C500190925 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + AB59BEC0223093C600190925 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + AB59BEC1223093C600190925 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + AB59BEC6223093C600190925 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = NO; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.1; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + }; + name = Debug; + }; + AB59BEC7223093C600190925 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = NO; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.1; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + AB59BEC9223093C600190925 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = HSRQC9N69B; + INFOPLIST_FILE = ContactsMRC/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.jkaunert.ContactsMRC; + PRODUCT_NAME = "$(TARGET_NAME)"; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + AB59BECA223093C600190925 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = HSRQC9N69B; + INFOPLIST_FILE = ContactsMRC/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.jkaunert.ContactsMRC; + PRODUCT_NAME = "$(TARGET_NAME)"; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + AB59BEAD223093C500190925 /* Build configuration list for PBXProject "ContactsMRC" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + AB59BEC6223093C600190925 /* Debug */, + AB59BEC7223093C600190925 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + AB59BEC8223093C600190925 /* Build configuration list for PBXNativeTarget "ContactsMRC" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + AB59BEC9223093C600190925 /* Debug */, + AB59BECA223093C600190925 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = AB59BEAA223093C500190925 /* Project object */; +} diff --git a/Sprint 12/Module 4/ContactsMRC/ContactsMRC.xcodeproj/xcshareddata/xcschemes/ContactsMRC.xcscheme b/Sprint 12/Module 4/ContactsMRC/ContactsMRC.xcodeproj/xcshareddata/xcschemes/ContactsMRC.xcscheme new file mode 100644 index 00000000..8b9245a8 --- /dev/null +++ b/Sprint 12/Module 4/ContactsMRC/ContactsMRC.xcodeproj/xcshareddata/xcschemes/ContactsMRC.xcscheme @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Sprint 12/Module 4/ContactsMRC/ContactsMRC/AppDelegate.h b/Sprint 12/Module 4/ContactsMRC/ContactsMRC/AppDelegate.h new file mode 100644 index 00000000..914e8821 --- /dev/null +++ b/Sprint 12/Module 4/ContactsMRC/ContactsMRC/AppDelegate.h @@ -0,0 +1,17 @@ +// +// AppDelegate.h +// ContactsMRC +// +// Created by TuneUp Shop on 3/6/19. +// Copyright © 2019 jkaunert. All rights reserved. +// + +#import + +@interface AppDelegate : UIResponder + +@property (strong, nonatomic) UIWindow *window; + + +@end + diff --git a/Sprint 12/Module 4/ContactsMRC/ContactsMRC/AppDelegate.m b/Sprint 12/Module 4/ContactsMRC/ContactsMRC/AppDelegate.m new file mode 100644 index 00000000..c2142ff5 --- /dev/null +++ b/Sprint 12/Module 4/ContactsMRC/ContactsMRC/AppDelegate.m @@ -0,0 +1,51 @@ +// +// AppDelegate.m +// ContactsMRC +// +// Created by TuneUp Shop on 3/6/19. +// Copyright © 2019 jkaunert. All rights reserved. +// + +#import "AppDelegate.h" + +@interface AppDelegate () + +@end + +@implementation AppDelegate + + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + // Override point for customization after application launch. + return YES; +} + + +- (void)applicationWillResignActive:(UIApplication *)application { + // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. +} + + +- (void)applicationDidEnterBackground:(UIApplication *)application { + // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. +} + + +- (void)applicationWillEnterForeground:(UIApplication *)application { + // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. +} + + +- (void)applicationDidBecomeActive:(UIApplication *)application { + // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. +} + + +- (void)applicationWillTerminate:(UIApplication *)application { + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. +} + + +@end diff --git a/Sprint 12/Module 4/ContactsMRC/ContactsMRC/Assets.xcassets/AppIcon.appiconset/Contents.json b/Sprint 12/Module 4/ContactsMRC/ContactsMRC/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000..d8db8d65 --- /dev/null +++ b/Sprint 12/Module 4/ContactsMRC/ContactsMRC/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,98 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "83.5x83.5", + "scale" : "2x" + }, + { + "idiom" : "ios-marketing", + "size" : "1024x1024", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Sprint 12/Module 4/ContactsMRC/ContactsMRC/Assets.xcassets/Contents.json b/Sprint 12/Module 4/ContactsMRC/ContactsMRC/Assets.xcassets/Contents.json new file mode 100644 index 00000000..da4a164c --- /dev/null +++ b/Sprint 12/Module 4/ContactsMRC/ContactsMRC/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Sprint 12/Module 4/ContactsMRC/ContactsMRC/Base.lproj/LaunchScreen.storyboard b/Sprint 12/Module 4/ContactsMRC/ContactsMRC/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 00000000..bfa36129 --- /dev/null +++ b/Sprint 12/Module 4/ContactsMRC/ContactsMRC/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Sprint 12/Module 4/ContactsMRC/ContactsMRC/Base.lproj/Main.storyboard b/Sprint 12/Module 4/ContactsMRC/ContactsMRC/Base.lproj/Main.storyboard new file mode 100644 index 00000000..09be5fd4 --- /dev/null +++ b/Sprint 12/Module 4/ContactsMRC/ContactsMRC/Base.lproj/Main.storyboard @@ -0,0 +1,186 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Sprint 12/Module 4/ContactsMRC/ContactsMRC/Info.plist b/Sprint 12/Module 4/ContactsMRC/ContactsMRC/Info.plist new file mode 100644 index 00000000..16be3b68 --- /dev/null +++ b/Sprint 12/Module 4/ContactsMRC/ContactsMRC/Info.plist @@ -0,0 +1,45 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/Sprint 12/Module 4/ContactsMRC/ContactsMRC/Model Controller/JKContactsController.h b/Sprint 12/Module 4/ContactsMRC/ContactsMRC/Model Controller/JKContactsController.h new file mode 100644 index 00000000..d399c021 --- /dev/null +++ b/Sprint 12/Module 4/ContactsMRC/ContactsMRC/Model Controller/JKContactsController.h @@ -0,0 +1,25 @@ +// +// JKContactsController.h +// ContactsMRC +// +// Created by TuneUp Shop on 3/7/19. +// Copyright © 2019 jkaunert. All rights reserved. +// + +#import +#import "JKContact.h" + +@interface JKContactsController : NSObject { + NSMutableArray *_savedContacts; +} + +@property (nonatomic, readonly, retain, nonnull) NSMutableArray *savedContacts; + ++ (id)sharedController; + +//- (void)saveContactWithName:(NSString *)name +// email:(NSString *)phone +// email:(NSString *)email; + +@end + diff --git a/Sprint 12/Module 4/ContactsMRC/ContactsMRC/Model Controller/JKContactsController.m b/Sprint 12/Module 4/ContactsMRC/ContactsMRC/Model Controller/JKContactsController.m new file mode 100644 index 00000000..85d89d83 --- /dev/null +++ b/Sprint 12/Module 4/ContactsMRC/ContactsMRC/Model Controller/JKContactsController.m @@ -0,0 +1,53 @@ +// +// JKContactsController.m +// ContactsMRC +// +// Created by TuneUp Shop on 3/7/19. +// Copyright © 2019 jkaunert. All rights reserved. +// + +#import "JKContactsController.h" + +@implementation JKContactsController + ++ (id)sharedController { + static JKContactsController *sharedController = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + sharedController = [[self alloc] init]; + }); + return sharedController; +} + +- (id)init { + if (self = [super init]) { + _savedContacts = [[NSMutableArray alloc] init]; + } + return self; +} + +- (void)dealloc { + +} + +//- (instancetype)init +//{ +// self = [super init]; +// if (self != nil){ +// @autoreleasepool { +// _savedContacts = [[NSMutableArray array] retain]; +// } +// +// +// } +// return self; +//} + +//- (void)saveContactWithName:(NSString *)name email:(NSString *)phone email:(NSString *)email { +// JKContact *contact = [[JKContact alloc]initWithName:name email:email phone:phone]; +// [_savedContacts addObject:contact]; +//} + + + +@end diff --git a/Sprint 12/Module 4/ContactsMRC/ContactsMRC/Model/JKContact.h b/Sprint 12/Module 4/ContactsMRC/ContactsMRC/Model/JKContact.h new file mode 100644 index 00000000..a5567bf1 --- /dev/null +++ b/Sprint 12/Module 4/ContactsMRC/ContactsMRC/Model/JKContact.h @@ -0,0 +1,27 @@ +// +// JKContact.h +// ContactsMRC +// +// Created by TuneUp Shop on 3/7/19. +// Copyright © 2019 jkaunert. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface JKContact : NSObject + +- (instancetype)initWithName:(NSString *)name + email:(NSString *)email + phone:(NSString *)phone; + +//- (instancetype)initWithDictionary:(NSDictionary *)dictionary; + +@property (nonatomic, readonly, copy) NSString *name; +@property (nonatomic, readonly, copy) NSString *email; +@property (nonatomic, readonly, copy) NSString *phone; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Sprint 12/Module 4/ContactsMRC/ContactsMRC/Model/JKContact.m b/Sprint 12/Module 4/ContactsMRC/ContactsMRC/Model/JKContact.m new file mode 100644 index 00000000..a989d664 --- /dev/null +++ b/Sprint 12/Module 4/ContactsMRC/ContactsMRC/Model/JKContact.m @@ -0,0 +1,36 @@ +// +// JKContact.m +// ContactsMRC +// +// Created by TuneUp Shop on 3/7/19. +// Copyright © 2019 jkaunert. All rights reserved. +// + +#import "JKContact.h" + +@implementation JKContact + +- (instancetype)initWithName:(NSString *)name email:(NSString *)email phone:(NSString *)phone +{ + self = [super init]; + if (self != nil) { + _name = [name copy]; + _email = [email copy]; + _phone = [phone copy]; + } + return self; +} + +//- (instancetype)initWithDictionary:(NSDictionary *)dictionary +//{ +// NSString *name = dictionary[@"name"]; +// NSString *email = dictionary[@"email"]; +// NSString *phone = dictionary[@"phone"]; +// if (!name || !email || !phone) { return nil; } +// +// return [self initWithName:name email:email phone:phone]; +//} + + + +@end diff --git a/Sprint 12/Module 4/ContactsMRC/ContactsMRC/View Controllers/JKContactDetailViewController.h b/Sprint 12/Module 4/ContactsMRC/ContactsMRC/View Controllers/JKContactDetailViewController.h new file mode 100644 index 00000000..ebd25ffc --- /dev/null +++ b/Sprint 12/Module 4/ContactsMRC/ContactsMRC/View Controllers/JKContactDetailViewController.h @@ -0,0 +1,24 @@ +// +// JKContactDetailViewController.h +// ContactsMRC +// +// Created by TuneUp Shop on 3/7/19. +// Copyright © 2019 jkaunert. All rights reserved. +// + +#import +#import "JKContactsController.h" +#import "JKContactsTableViewController.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface JKContactDetailViewController : UIViewController { + JKContactsController *sharedController; +} + +@property (nonatomic, nullable, strong) JKContact *contact; +//@property (nonatomic, nullable, strong) JKContactsController *contactController; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Sprint 12/Module 4/ContactsMRC/ContactsMRC/View Controllers/JKContactDetailViewController.m b/Sprint 12/Module 4/ContactsMRC/ContactsMRC/View Controllers/JKContactDetailViewController.m new file mode 100644 index 00000000..2e9c7d73 --- /dev/null +++ b/Sprint 12/Module 4/ContactsMRC/ContactsMRC/View Controllers/JKContactDetailViewController.m @@ -0,0 +1,59 @@ +// +// JKContactDetailViewController.m +// ContactsMRC +// +// Created by TuneUp Shop on 3/7/19. +// Copyright © 2019 jkaunert. All rights reserved. +// + +#import "JKContactDetailViewController.h" + + +@interface JKContactDetailViewController () + + +@property (retain, nonatomic) IBOutlet UITextField *contactNameTextField; + +@property (retain, nonatomic) IBOutlet UITextField *contactPhoneTextField; + +@property (retain, nonatomic) IBOutlet UITextField *contactEmailTextField; + +//@property (nonatomic, readonly, nonnull) NSMutableArray *savedContacts; + + +@end + +@implementation JKContactDetailViewController + +- (void)viewDidLoad { + [super viewDidLoad]; +// @autoreleasepool { +// sharedController.savedContacts = [[NSMutableArray alloc] init]; +// +// } + + +} + + + +- (IBAction)saveContact:(id)sender { + @autoreleasepool { + _contact = [[JKContact alloc] initWithName:_contactNameTextField.text email:_contactEmailTextField.text phone:_contactPhoneTextField.text]; + } + + [sharedController.savedContacts addObject:_contact]; + NSLog(@"%@", [sharedController.savedContacts firstObject]); + [self.navigationController popViewControllerAnimated:YES]; + +} + + +- (void)dealloc { + [_contactNameTextField release]; + [_contactPhoneTextField release]; + [_contactEmailTextField release]; + [_contact release]; + [super dealloc]; +} +@end diff --git a/Sprint 12/Module 4/ContactsMRC/ContactsMRC/View Controllers/JKContactsTableViewController.h b/Sprint 12/Module 4/ContactsMRC/ContactsMRC/View Controllers/JKContactsTableViewController.h new file mode 100644 index 00000000..04f3d8a2 --- /dev/null +++ b/Sprint 12/Module 4/ContactsMRC/ContactsMRC/View Controllers/JKContactsTableViewController.h @@ -0,0 +1,19 @@ +// +// JKContactsTableViewController.h +// ContactsMRC +// +// Created by TuneUp Shop on 3/7/19. +// Copyright © 2019 jkaunert. All rights reserved. +// + +#import +#import "JKContactDetailViewController.h" +#import "JKContactsController.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface JKContactsTableViewController : UITableViewController + +@end + +NS_ASSUME_NONNULL_END diff --git a/Sprint 12/Module 4/ContactsMRC/ContactsMRC/View Controllers/JKContactsTableViewController.m b/Sprint 12/Module 4/ContactsMRC/ContactsMRC/View Controllers/JKContactsTableViewController.m new file mode 100644 index 00000000..cb7fe29a --- /dev/null +++ b/Sprint 12/Module 4/ContactsMRC/ContactsMRC/View Controllers/JKContactsTableViewController.m @@ -0,0 +1,74 @@ +// +// JKContactsTableViewController.m +// ContactsMRC +// +// Created by TuneUp Shop on 3/7/19. +// Copyright © 2019 jkaunert. All rights reserved. +// + +#import "JKContactsTableViewController.h" + + +@interface JKContactsTableViewController () { + JKContactsController *sharedController; +} + +//@property (nonatomic, retain, nonnull) JKContactsController *sharedController; + + +@end + +@implementation JKContactsTableViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + +// JKContactsController *sharedController = [JKContactsController sharedController]; +// @autoreleasepool { +// _contactController = [[JKContactsController alloc] init]; +// } +} + +- (void)viewWillAppear:(BOOL)animated { + [super viewWillAppear:YES]; + [[self tableView] reloadData]; +} + +#pragma mark - Table view data source + + + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { + return sharedController.savedContacts.count; +} + + +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"ContactCell" forIndexPath:indexPath]; + + // Configure the cell... + JKContact *contact = [sharedController.savedContacts objectAtIndex:indexPath.row]; + cell.textLabel.text = contact.name; + return cell; +} + + + +#pragma mark - Navigation + +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { + if ([segue.identifier isEqual:@"AddContactView"]) { + JKContactDetailViewController *destinationVC = [segue destinationViewController]; + //destinationVC.sharedController = sharedController; + }else if ([segue.identifier isEqual:@"ContactDetailView"]) { + JKContactDetailViewController *destinationVC = [segue destinationViewController]; + //destinationVC.sharedController = sharedController; + NSIndexPath *selectedRow = self.tableView.indexPathForSelectedRow; + NSInteger row = selectedRow.row; + JKContact *contact = [sharedController.savedContacts objectAtIndex:row]; + destinationVC.contact = contact; + } +} + + +@end diff --git a/Sprint 12/Module 4/ContactsMRC/ContactsMRC/main.m b/Sprint 12/Module 4/ContactsMRC/ContactsMRC/main.m new file mode 100644 index 00000000..3f571aa8 --- /dev/null +++ b/Sprint 12/Module 4/ContactsMRC/ContactsMRC/main.m @@ -0,0 +1,16 @@ +// +// main.m +// ContactsMRC +// +// Created by TuneUp Shop on 3/6/19. +// Copyright © 2019 jkaunert. All rights reserved. +// + +#import +#import "AppDelegate.h" + +int main(int argc, char * argv[]) { + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); + } +} diff --git a/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC.xcodeproj/project.pbxproj b/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC.xcodeproj/project.pbxproj new file mode 100644 index 00000000..c195ce8c --- /dev/null +++ b/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC.xcodeproj/project.pbxproj @@ -0,0 +1,473 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXBuildFile section */ + AB59BE2C222DAEB200190925 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = AB59BE2B222DAEB200190925 /* AppDelegate.m */; }; + AB59BE32222DAEB200190925 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = AB59BE30222DAEB200190925 /* Main.storyboard */; }; + AB59BE34222DAEB400190925 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = AB59BE33222DAEB400190925 /* Assets.xcassets */; }; + AB59BE37222DAEB400190925 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = AB59BE35222DAEB400190925 /* LaunchScreen.storyboard */; }; + AB59BE3A222DAEB400190925 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = AB59BE39222DAEB400190925 /* main.m */; }; + AB59BE46222DE08900190925 /* JKMarsPhotoReference.m in Sources */ = {isa = PBXBuildFile; fileRef = AB59BE45222DE08900190925 /* JKMarsPhotoReference.m */; }; + AB59BE4B222DE0C400190925 /* JKMarsRover.m in Sources */ = {isa = PBXBuildFile; fileRef = AB59BE4A222DE0C400190925 /* JKMarsRover.m */; }; + AB59BE4F222DE0E600190925 /* JKSolDescription.m in Sources */ = {isa = PBXBuildFile; fileRef = AB59BE4E222DE0E600190925 /* JKSolDescription.m */; }; + AB59BE53222DE16A00190925 /* Camera.swift in Sources */ = {isa = PBXBuildFile; fileRef = AB59BE52222DE16A00190925 /* Camera.swift */; }; + AB59BE58222DE8DA00190925 /* PhotoDetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = AB59BE57222DE8DA00190925 /* PhotoDetailViewController.swift */; }; + AB59BE5A222DE94500190925 /* PhotosCollectionViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = AB59BE59222DE94500190925 /* PhotosCollectionViewController.swift */; }; + AB59BE5C222DE99A00190925 /* ImageCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = AB59BE5B222DE99A00190925 /* ImageCollectionViewCell.swift */; }; + AB7D91D92237167E00A8FEF8 /* JKCache.m in Sources */ = {isa = PBXBuildFile; fileRef = AB7D91D82237167E00A8FEF8 /* JKCache.m */; }; + AB7D91DD223716E100A8FEF8 /* JKMarsRoverClient.m in Sources */ = {isa = PBXBuildFile; fileRef = AB7D91DC223716E100A8FEF8 /* JKMarsRoverClient.m */; }; + AB7D91E12237189300A8FEF8 /* NSURLSession+JKNetworkDataLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = AB7D91E02237189300A8FEF8 /* NSURLSession+JKNetworkDataLoader.m */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + AB59BE27222DAEB200190925 /* Astronomy-ObjC.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Astronomy-ObjC.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + AB59BE2A222DAEB200190925 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + AB59BE2B222DAEB200190925 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + AB59BE31222DAEB200190925 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + AB59BE33222DAEB400190925 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + AB59BE36222DAEB400190925 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + AB59BE38222DAEB400190925 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + AB59BE39222DAEB400190925 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + AB59BE44222DE08900190925 /* JKMarsPhotoReference.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JKMarsPhotoReference.h; sourceTree = ""; }; + AB59BE45222DE08900190925 /* JKMarsPhotoReference.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = JKMarsPhotoReference.m; sourceTree = ""; }; + AB59BE49222DE0C400190925 /* JKMarsRover.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JKMarsRover.h; sourceTree = ""; }; + AB59BE4A222DE0C400190925 /* JKMarsRover.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = JKMarsRover.m; sourceTree = ""; }; + AB59BE4D222DE0E600190925 /* JKSolDescription.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JKSolDescription.h; sourceTree = ""; }; + AB59BE4E222DE0E600190925 /* JKSolDescription.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = JKSolDescription.m; sourceTree = ""; }; + AB59BE51222DE16A00190925 /* Astronomy-ObjC-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Astronomy-ObjC-Bridging-Header.h"; sourceTree = ""; }; + AB59BE52222DE16A00190925 /* Camera.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = Camera.swift; path = "Astronomy-ObjC/Models/Camera.swift/Camera.swift"; sourceTree = SOURCE_ROOT; }; + AB59BE57222DE8DA00190925 /* PhotoDetailViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PhotoDetailViewController.swift; sourceTree = ""; }; + AB59BE59222DE94500190925 /* PhotosCollectionViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PhotosCollectionViewController.swift; sourceTree = ""; }; + AB59BE5B222DE99A00190925 /* ImageCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImageCollectionViewCell.swift; sourceTree = ""; }; + AB7D91D72237167E00A8FEF8 /* JKCache.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JKCache.h; sourceTree = ""; }; + AB7D91D82237167E00A8FEF8 /* JKCache.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = JKCache.m; sourceTree = ""; }; + AB7D91DB223716E100A8FEF8 /* JKMarsRoverClient.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JKMarsRoverClient.h; sourceTree = ""; }; + AB7D91DC223716E100A8FEF8 /* JKMarsRoverClient.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = JKMarsRoverClient.m; sourceTree = ""; }; + AB7D91DF2237189300A8FEF8 /* NSURLSession+JKNetworkDataLoader.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSURLSession+JKNetworkDataLoader.h"; sourceTree = ""; }; + AB7D91E02237189300A8FEF8 /* NSURLSession+JKNetworkDataLoader.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSURLSession+JKNetworkDataLoader.m"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + AB59BE24222DAEB200190925 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + AB59BE1E222DAEB200190925 = { + isa = PBXGroup; + children = ( + AB59BE29222DAEB200190925 /* Astronomy-ObjC */, + AB59BE28222DAEB200190925 /* Products */, + ); + sourceTree = ""; + }; + AB59BE28222DAEB200190925 /* Products */ = { + isa = PBXGroup; + children = ( + AB59BE27222DAEB200190925 /* Astronomy-ObjC.app */, + ); + name = Products; + sourceTree = ""; + }; + AB59BE29222DAEB200190925 /* Astronomy-ObjC */ = { + isa = PBXGroup; + children = ( + AB59BE2A222DAEB200190925 /* AppDelegate.h */, + AB59BE2B222DAEB200190925 /* AppDelegate.m */, + AB7D91E322371E0C00A8FEF8 /* Networking */, + AB59BE56222DE89A00190925 /* View Controllers */, + AB59BE55222DE88E00190925 /* Views */, + AB59BE48222DE0A500190925 /* Models */, + AB59BE30222DAEB200190925 /* Main.storyboard */, + AB59BE33222DAEB400190925 /* Assets.xcassets */, + AB59BE35222DAEB400190925 /* LaunchScreen.storyboard */, + AB59BE38222DAEB400190925 /* Info.plist */, + AB59BE39222DAEB400190925 /* main.m */, + ); + path = "Astronomy-ObjC"; + sourceTree = ""; + }; + AB59BE47222DE09000190925 /* JKMarsPhotoReference */ = { + isa = PBXGroup; + children = ( + AB59BE44222DE08900190925 /* JKMarsPhotoReference.h */, + AB59BE45222DE08900190925 /* JKMarsPhotoReference.m */, + ); + path = JKMarsPhotoReference; + sourceTree = ""; + }; + AB59BE48222DE0A500190925 /* Models */ = { + isa = PBXGroup; + children = ( + AB7D91DA2237169700A8FEF8 /* Cache */, + AB59BE54222DE18D00190925 /* Camera.swift */, + AB59BE47222DE09000190925 /* JKMarsPhotoReference */, + AB59BE4C222DE0C900190925 /* JKMarsRover */, + AB59BE50222DE0EC00190925 /* JKSolDescription */, + ); + path = Models; + sourceTree = ""; + }; + AB59BE4C222DE0C900190925 /* JKMarsRover */ = { + isa = PBXGroup; + children = ( + AB59BE49222DE0C400190925 /* JKMarsRover.h */, + AB59BE4A222DE0C400190925 /* JKMarsRover.m */, + ); + path = JKMarsRover; + sourceTree = ""; + }; + AB59BE50222DE0EC00190925 /* JKSolDescription */ = { + isa = PBXGroup; + children = ( + AB59BE4D222DE0E600190925 /* JKSolDescription.h */, + AB59BE4E222DE0E600190925 /* JKSolDescription.m */, + ); + path = JKSolDescription; + sourceTree = ""; + }; + AB59BE54222DE18D00190925 /* Camera.swift */ = { + isa = PBXGroup; + children = ( + AB59BE52222DE16A00190925 /* Camera.swift */, + AB59BE51222DE16A00190925 /* Astronomy-ObjC-Bridging-Header.h */, + ); + path = Camera.swift; + sourceTree = ""; + }; + AB59BE55222DE88E00190925 /* Views */ = { + isa = PBXGroup; + children = ( + AB59BE5B222DE99A00190925 /* ImageCollectionViewCell.swift */, + ); + path = Views; + sourceTree = ""; + }; + AB59BE56222DE89A00190925 /* View Controllers */ = { + isa = PBXGroup; + children = ( + AB59BE57222DE8DA00190925 /* PhotoDetailViewController.swift */, + AB59BE59222DE94500190925 /* PhotosCollectionViewController.swift */, + ); + path = "View Controllers"; + sourceTree = ""; + }; + AB7D91DA2237169700A8FEF8 /* Cache */ = { + isa = PBXGroup; + children = ( + AB7D91D72237167E00A8FEF8 /* JKCache.h */, + AB7D91D82237167E00A8FEF8 /* JKCache.m */, + ); + name = Cache; + path = "New Group"; + sourceTree = ""; + }; + AB7D91E322371E0C00A8FEF8 /* Networking */ = { + isa = PBXGroup; + children = ( + AB7D91DB223716E100A8FEF8 /* JKMarsRoverClient.h */, + AB7D91DC223716E100A8FEF8 /* JKMarsRoverClient.m */, + AB7D91DF2237189300A8FEF8 /* NSURLSession+JKNetworkDataLoader.h */, + AB7D91E02237189300A8FEF8 /* NSURLSession+JKNetworkDataLoader.m */, + ); + path = Networking; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + AB59BE26222DAEB200190925 /* Astronomy-ObjC */ = { + isa = PBXNativeTarget; + buildConfigurationList = AB59BE3D222DAEB400190925 /* Build configuration list for PBXNativeTarget "Astronomy-ObjC" */; + buildPhases = ( + AB59BE23222DAEB200190925 /* Sources */, + AB59BE24222DAEB200190925 /* Frameworks */, + AB59BE25222DAEB200190925 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "Astronomy-ObjC"; + productName = "Astronomy-ObjC"; + productReference = AB59BE27222DAEB200190925 /* Astronomy-ObjC.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + AB59BE1F222DAEB200190925 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 1010; + ORGANIZATIONNAME = jkaunert; + TargetAttributes = { + AB59BE26222DAEB200190925 = { + CreatedOnToolsVersion = 10.1; + LastSwiftMigration = 1010; + }; + }; + }; + buildConfigurationList = AB59BE22222DAEB200190925 /* Build configuration list for PBXProject "Astronomy-ObjC" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = AB59BE1E222DAEB200190925; + productRefGroup = AB59BE28222DAEB200190925 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + AB59BE26222DAEB200190925 /* Astronomy-ObjC */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + AB59BE25222DAEB200190925 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + AB59BE37222DAEB400190925 /* LaunchScreen.storyboard in Resources */, + AB59BE34222DAEB400190925 /* Assets.xcassets in Resources */, + AB59BE32222DAEB200190925 /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + AB59BE23222DAEB200190925 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + AB7D91E12237189300A8FEF8 /* NSURLSession+JKNetworkDataLoader.m in Sources */, + AB59BE4F222DE0E600190925 /* JKSolDescription.m in Sources */, + AB59BE3A222DAEB400190925 /* main.m in Sources */, + AB59BE2C222DAEB200190925 /* AppDelegate.m in Sources */, + AB59BE4B222DE0C400190925 /* JKMarsRover.m in Sources */, + AB59BE46222DE08900190925 /* JKMarsPhotoReference.m in Sources */, + AB59BE53222DE16A00190925 /* Camera.swift in Sources */, + AB59BE5C222DE99A00190925 /* ImageCollectionViewCell.swift in Sources */, + AB7D91D92237167E00A8FEF8 /* JKCache.m in Sources */, + AB59BE5A222DE94500190925 /* PhotosCollectionViewController.swift in Sources */, + AB7D91DD223716E100A8FEF8 /* JKMarsRoverClient.m in Sources */, + AB59BE58222DE8DA00190925 /* PhotoDetailViewController.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + AB59BE30222DAEB200190925 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + AB59BE31222DAEB200190925 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + AB59BE35222DAEB400190925 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + AB59BE36222DAEB400190925 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + AB59BE3B222DAEB400190925 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.1; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + }; + name = Debug; + }; + AB59BE3C222DAEB400190925 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.1; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + AB59BE3E222DAEB400190925 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_STYLE = Automatic; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = HSRQC9N69B; + INFOPLIST_FILE = "Astronomy-ObjC/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.jkaunert.Astronomy-ObjC"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Astronomy-ObjC/Models/Camera.swift/Astronomy-ObjC-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + AB59BE3F222DAEB400190925 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_STYLE = Automatic; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = HSRQC9N69B; + INFOPLIST_FILE = "Astronomy-ObjC/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.jkaunert.Astronomy-ObjC"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Astronomy-ObjC/Models/Camera.swift/Astronomy-ObjC-Bridging-Header.h"; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + AB59BE22222DAEB200190925 /* Build configuration list for PBXProject "Astronomy-ObjC" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + AB59BE3B222DAEB400190925 /* Debug */, + AB59BE3C222DAEB400190925 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + AB59BE3D222DAEB400190925 /* Build configuration list for PBXNativeTarget "Astronomy-ObjC" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + AB59BE3E222DAEB400190925 /* Debug */, + AB59BE3F222DAEB400190925 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = AB59BE1F222DAEB200190925 /* Project object */; +} diff --git a/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/AppDelegate.h b/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/AppDelegate.h new file mode 100644 index 00000000..3099c9f9 --- /dev/null +++ b/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/AppDelegate.h @@ -0,0 +1,17 @@ +// +// AppDelegate.h +// Astronomy-ObjC +// +// Created by TuneUp Shop on 3/4/19. +// Copyright © 2019 jkaunert. All rights reserved. +// + +#import + +@interface AppDelegate : UIResponder + +@property (strong, nonatomic) UIWindow *window; + + +@end + diff --git a/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/AppDelegate.m b/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/AppDelegate.m new file mode 100644 index 00000000..8f69d16e --- /dev/null +++ b/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/AppDelegate.m @@ -0,0 +1,51 @@ +// +// AppDelegate.m +// Astronomy-ObjC +// +// Created by TuneUp Shop on 3/4/19. +// Copyright © 2019 jkaunert. All rights reserved. +// + +#import "AppDelegate.h" + +@interface AppDelegate () + +@end + +@implementation AppDelegate + + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + // Override point for customization after application launch. + return YES; +} + + +- (void)applicationWillResignActive:(UIApplication *)application { + // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. +} + + +- (void)applicationDidEnterBackground:(UIApplication *)application { + // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. +} + + +- (void)applicationWillEnterForeground:(UIApplication *)application { + // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. +} + + +- (void)applicationDidBecomeActive:(UIApplication *)application { + // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. +} + + +- (void)applicationWillTerminate:(UIApplication *)application { + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. +} + + +@end diff --git a/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Assets.xcassets/AppIcon.appiconset/Contents.json b/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000..d8db8d65 --- /dev/null +++ b/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,98 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "83.5x83.5", + "scale" : "2x" + }, + { + "idiom" : "ios-marketing", + "size" : "1024x1024", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Assets.xcassets/Contents.json b/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Assets.xcassets/Contents.json new file mode 100644 index 00000000..da4a164c --- /dev/null +++ b/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Assets.xcassets/MarsPlaceholder.imageset/Contents.json b/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Assets.xcassets/MarsPlaceholder.imageset/Contents.json new file mode 100644 index 00000000..7728e0bc --- /dev/null +++ b/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Assets.xcassets/MarsPlaceholder.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "MarsPlaceholder.jpg" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Assets.xcassets/MarsPlaceholder.imageset/MarsPlaceholder.jpg b/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Assets.xcassets/MarsPlaceholder.imageset/MarsPlaceholder.jpg new file mode 100644 index 00000000..a43b5801 Binary files /dev/null and b/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Assets.xcassets/MarsPlaceholder.imageset/MarsPlaceholder.jpg differ diff --git a/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Base.lproj/LaunchScreen.storyboard b/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 00000000..bfa36129 --- /dev/null +++ b/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Base.lproj/Main.storyboard b/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Base.lproj/Main.storyboard new file mode 100644 index 00000000..5a5aadf0 --- /dev/null +++ b/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Base.lproj/Main.storyboard @@ -0,0 +1,183 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Info.plist b/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Info.plist new file mode 100644 index 00000000..16be3b68 --- /dev/null +++ b/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Info.plist @@ -0,0 +1,45 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Models/Camera.swift/Astronomy-ObjC-Bridging-Header.h b/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Models/Camera.swift/Astronomy-ObjC-Bridging-Header.h new file mode 100644 index 00000000..70887213 --- /dev/null +++ b/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Models/Camera.swift/Astronomy-ObjC-Bridging-Header.h @@ -0,0 +1,9 @@ +// +// Use this file to import your target's public headers that you would like to expose to Swift. +// + +#import "JKMarsPhotoReference.h" +#import "JKMarsRover.h" +#import "JKSolDescription.h" +#import "Astronomy-ObjC-Bridging-Header.h" + diff --git a/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Models/Camera.swift/Camera.swift b/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Models/Camera.swift/Camera.swift new file mode 100644 index 00000000..636f2958 --- /dev/null +++ b/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Models/Camera.swift/Camera.swift @@ -0,0 +1,24 @@ +// +// Camera.swift +// Astronomy-ObjC +// +// Created by TuneUp Shop on 3/4/19. +// Copyright © 2019 jkaunert. All rights reserved. +// + +import Foundation + +class Camera { + + let id: Int + let name: String + let roverId: Int + let fullName: String + + init(id: Int, name: String, roverId: Int, fullName: String){ + self.id = id + self.name = name + self.roverId = roverId + self.fullName = fullName + } +} diff --git a/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Models/JKMarsPhotoReference/JKMarsPhotoReference.h b/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Models/JKMarsPhotoReference/JKMarsPhotoReference.h new file mode 100644 index 00000000..c9294624 --- /dev/null +++ b/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Models/JKMarsPhotoReference/JKMarsPhotoReference.h @@ -0,0 +1,33 @@ +// +// JKMarsPhotoReference.h +// Astronomy-ObjC +// +// Created by TuneUp Shop on 3/4/19. +// Copyright © 2019 jkaunert. All rights reserved. +// + +#import +#import "Astronomy_ObjC-Swift.h" + +@class Camera; + +NS_ASSUME_NONNULL_BEGIN + +@interface JKMarsPhotoReference : NSObject + +- (instancetype)initWithId:(int)identifier + sol:(int)sol + camera:(Camera *)camera + earthDate:(NSDate *)earthDate + imgSrc:(NSURL *)imgSrc; + +@property (nonatomic, copy, readonly) Camera *camera; +@property (nonatomic, copy, readonly) NSDate *earthDate; +@property (nonatomic, readonly) int identifier; +@property (nonatomic, readonly) int sol; +@property (nonatomic, copy, readonly) NSURL *imgSrc; + + +@end + +NS_ASSUME_NONNULL_END diff --git a/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Models/JKMarsPhotoReference/JKMarsPhotoReference.m b/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Models/JKMarsPhotoReference/JKMarsPhotoReference.m new file mode 100644 index 00000000..bcc641c0 --- /dev/null +++ b/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Models/JKMarsPhotoReference/JKMarsPhotoReference.m @@ -0,0 +1,26 @@ +// +// JKMarsPhotoReference.m +// Astronomy-ObjC +// +// Created by TuneUp Shop on 3/4/19. +// Copyright © 2019 jkaunert. All rights reserved. +// + +#import "JKMarsPhotoReference.h" + +@implementation JKMarsPhotoReference + +- (instancetype)initWithId:(int)identifier sol:(int)sol camera:(Camera *)camera earthDate:(NSDate *)earthDate imgSrc:(NSURL *)imgSrc +{ + self = [super init]; + if (self != nil) { + _identifier = identifier; + _sol = sol; + _camera = camera; + _earthDate = earthDate; + _imgSrc = imgSrc; + } + return self; +} + +@end diff --git a/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Models/JKMarsRover/JKMarsRover.h b/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Models/JKMarsRover/JKMarsRover.h new file mode 100644 index 00000000..c2b10bc5 --- /dev/null +++ b/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Models/JKMarsRover/JKMarsRover.h @@ -0,0 +1,17 @@ +// +// JKMarsRover.h +// Astronomy-ObjC +// +// Created by TuneUp Shop on 3/4/19. +// Copyright © 2019 jkaunert. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface JKMarsRover : NSObject + +@end + +NS_ASSUME_NONNULL_END diff --git a/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Models/JKMarsRover/JKMarsRover.m b/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Models/JKMarsRover/JKMarsRover.m new file mode 100644 index 00000000..a7342c17 --- /dev/null +++ b/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Models/JKMarsRover/JKMarsRover.m @@ -0,0 +1,13 @@ +// +// JKMarsRover.m +// Astronomy-ObjC +// +// Created by TuneUp Shop on 3/4/19. +// Copyright © 2019 jkaunert. All rights reserved. +// + +#import "JKMarsRover.h" + +@implementation JKMarsRover + +@end diff --git a/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Models/JKSolDescription/JKSolDescription.h b/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Models/JKSolDescription/JKSolDescription.h new file mode 100644 index 00000000..7522d927 --- /dev/null +++ b/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Models/JKSolDescription/JKSolDescription.h @@ -0,0 +1,19 @@ +// +// JKSolDescription.h +// Astronomy-ObjC +// +// Created by TuneUp Shop on 3/4/19. +// Copyright © 2019 jkaunert. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface JKSolDescription : NSObject + + + +@end + +NS_ASSUME_NONNULL_END diff --git a/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Models/JKSolDescription/JKSolDescription.m b/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Models/JKSolDescription/JKSolDescription.m new file mode 100644 index 00000000..ee4c758a --- /dev/null +++ b/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Models/JKSolDescription/JKSolDescription.m @@ -0,0 +1,13 @@ +// +// JKSolDescription.m +// Astronomy-ObjC +// +// Created by TuneUp Shop on 3/4/19. +// Copyright © 2019 jkaunert. All rights reserved. +// + +#import "JKSolDescription.h" + +@implementation JKSolDescription + +@end diff --git a/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Models/New Group/JKCache.h b/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Models/New Group/JKCache.h new file mode 100644 index 00000000..2e9bacf7 --- /dev/null +++ b/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Models/New Group/JKCache.h @@ -0,0 +1,17 @@ +// +// JKCache.h +// Astronomy-ObjC +// +// Created by TuneUp Shop on 3/11/19. +// Copyright © 2019 jkaunert. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface JKCache : NSObject + +@end + +NS_ASSUME_NONNULL_END diff --git a/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Models/New Group/JKCache.m b/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Models/New Group/JKCache.m new file mode 100644 index 00000000..cc7e7348 --- /dev/null +++ b/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Models/New Group/JKCache.m @@ -0,0 +1,13 @@ +// +// JKCache.m +// Astronomy-ObjC +// +// Created by TuneUp Shop on 3/11/19. +// Copyright © 2019 jkaunert. All rights reserved. +// + +#import "JKCache.h" + +@implementation JKCache + +@end diff --git a/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Networking/JKMarsRoverClient.h b/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Networking/JKMarsRoverClient.h new file mode 100644 index 00000000..58688c2d --- /dev/null +++ b/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Networking/JKMarsRoverClient.h @@ -0,0 +1,17 @@ +// +// JKMarsRoverClient.h +// Astronomy-ObjC +// +// Created by TuneUp Shop on 3/11/19. +// Copyright © 2019 jkaunert. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface JKMarsRoverClient : NSObject + +@end + +NS_ASSUME_NONNULL_END diff --git a/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Networking/JKMarsRoverClient.m b/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Networking/JKMarsRoverClient.m new file mode 100644 index 00000000..8ce41e35 --- /dev/null +++ b/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Networking/JKMarsRoverClient.m @@ -0,0 +1,13 @@ +// +// JKMarsRoverClient.m +// Astronomy-ObjC +// +// Created by TuneUp Shop on 3/11/19. +// Copyright © 2019 jkaunert. All rights reserved. +// + +#import "JKMarsRoverClient.h" + +@implementation JKMarsRoverClient + +@end diff --git a/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Networking/NSURLSession+JKNetworkDataLoader.h b/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Networking/NSURLSession+JKNetworkDataLoader.h new file mode 100644 index 00000000..f8b2af93 --- /dev/null +++ b/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Networking/NSURLSession+JKNetworkDataLoader.h @@ -0,0 +1,17 @@ +// +// NSURLSession+JKNetworkDataLoader.h +// Astronomy-ObjC +// +// Created by TuneUp Shop on 3/11/19. +// Copyright © 2019 jkaunert. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface NSURLSession (JKNetworkDataLoader) + +@end + +NS_ASSUME_NONNULL_END diff --git a/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Networking/NSURLSession+JKNetworkDataLoader.m b/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Networking/NSURLSession+JKNetworkDataLoader.m new file mode 100644 index 00000000..59678dee --- /dev/null +++ b/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Networking/NSURLSession+JKNetworkDataLoader.m @@ -0,0 +1,13 @@ +// +// NSURLSession+JKNetworkDataLoader.m +// Astronomy-ObjC +// +// Created by TuneUp Shop on 3/11/19. +// Copyright © 2019 jkaunert. All rights reserved. +// + +#import "NSURLSession+JKNetworkDataLoader.h" + +@implementation NSURLSession (JKNetworkDataLoader) + +@end diff --git a/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/View Controllers/PhotoDetailViewController.swift b/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/View Controllers/PhotoDetailViewController.swift new file mode 100644 index 00000000..2abbb909 --- /dev/null +++ b/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/View Controllers/PhotoDetailViewController.swift @@ -0,0 +1,79 @@ +// +// PhotoDetailViewController.swift +// Astronomy-ObjC +// +// Created by TuneUp Shop on 3/4/19. +// Copyright © 2019 jkaunert. All rights reserved. +// + +import UIKit +import Photos + +@objcMembers +class PhotoDetailViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + updateViews() + } + + @IBAction func save(_ sender: Any) { + guard let image = imageView.image else { return } + PHPhotoLibrary.shared().performChanges({ + PHAssetChangeRequest.creationRequestForAsset(from: image) + }, completionHandler: { (success, error) in + if let error = error { + NSLog("Error saving photo: \(error)") + return + } + DispatchQueue.main.async { + self.presentSuccessfulSaveAlert() + } + }) + } + + func presentSuccessfulSaveAlert() { + let alert = UIAlertController(title: "Photo Saved!", message: "The photo has been saved to your Photo Library!", preferredStyle: .alert) + let okayAction = UIAlertAction(title: "Okay", style: .default, handler: nil) + + alert.addAction(okayAction) + + present(alert, animated: true, completion: nil) + } + + // MARK: - Private + + private func updateViews() { + guard let photo = photo, isViewLoaded else { return } + do { + let data = try Data(contentsOf: photo.imgSrc) + imageView.image = UIImage(data: data) + let dateString = dateFormatter.string(from: photo.earthDate) + detailLabel.text = "Taken by \(photo.camera.roverId) on \(dateString) (Sol \(photo.sol))" + cameraLabel.text = photo.camera.fullName + } catch { + NSLog("Error setting up views on detail view controller: \(error)") + } + } + + // MARK: - Properties + + var photo: JKMarsPhotoReference? { + didSet { + updateViews() + } + } + + lazy var dateFormatter: DateFormatter = { + let df = DateFormatter() + df.dateStyle = .short + df.timeStyle = .short + return df + }() + + @IBOutlet weak var imageView: UIImageView! + @IBOutlet weak var detailLabel: UILabel! + @IBOutlet weak var cameraLabel: UILabel! + +} + diff --git a/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/View Controllers/PhotosCollectionViewController.swift b/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/View Controllers/PhotosCollectionViewController.swift new file mode 100644 index 00000000..34cc84d1 --- /dev/null +++ b/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/View Controllers/PhotosCollectionViewController.swift @@ -0,0 +1,209 @@ +// +// PhotosCollectionViewController.swift +// Astronomy-ObjC +// +// Created by TuneUp Shop on 3/4/19. +// Copyright © 2019 jkaunert. All rights reserved. +// + +import UIKit + +class PhotosCollectionViewController: UIViewController, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout { + + override func viewDidLoad() { + super.viewDidLoad() + + client.fetchMarsRover(named: "curiosity") { (rover, error) in + if let error = error { + NSLog("Error fetching info for curiosity: \(error)") + return + } + + self.roverInfo = rover + } + + configureTitleView() + updateViews() + } + + @IBAction func goToPreviousSol(_ sender: Any?) { + guard let solDescription = solDescription else { return } + guard let solDescriptions = roverInfo?.solDescriptions else { return } + guard let index = solDescriptions.index(of: solDescription) else { return } + guard index > 0 else { return } + self.solDescription = solDescriptions[index-1] + } + + @IBAction func goToNextSol(_ sender: Any?) { + guard let solDescription = solDescription else { return } + guard let solDescriptions = roverInfo?.solDescriptions else { return } + guard let index = solDescriptions.index(of: solDescription) else { return } + guard index < solDescriptions.count - 1 else { return } + self.solDescription = solDescriptions[index+1] + } + + // UICollectionViewDataSource/Delegate + + func numberOfSections(in collectionView: UICollectionView) -> Int { + return 1 + } + + func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { + NSLog("num photos: \(photoReferences.count)") + return photoReferences.count + } + + func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { + let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "ImageCell", for: indexPath) as? ImageCollectionViewCell ?? ImageCollectionViewCell() + + loadImage(forCell: cell, forItemAt: indexPath) + + return cell + } + + func collectionView(_ collectionView: UICollectionView, didEndDisplaying cell: UICollectionViewCell, forItemAt indexPath: IndexPath) { + if photoReferences.count > 0 { + let photoRef = photoReferences[indexPath.item] + operations[photoRef.id]?.cancel() + } else { + for (_, operation) in operations { + operation.cancel() + } + } + } + + func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { + let flowLayout = collectionViewLayout as! UICollectionViewFlowLayout + var totalUsableWidth = collectionView.frame.width + let inset = self.collectionView(collectionView, layout: collectionViewLayout, insetForSectionAt: indexPath.section) + totalUsableWidth -= inset.left + inset.right + + let minWidth: CGFloat = 150.0 + let numberOfItemsInOneRow = Int(totalUsableWidth / minWidth) + totalUsableWidth -= CGFloat(numberOfItemsInOneRow - 1) * flowLayout.minimumInteritemSpacing + let width = totalUsableWidth / CGFloat(numberOfItemsInOneRow) + return CGSize(width: width, height: width) + } + + func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAt section: Int) -> UIEdgeInsets { + return UIEdgeInsets(top: 0, left: 10.0, bottom: 0, right: 10.0) + } + + // MARK: - Navigation + + override func prepare(for segue: UIStoryboardSegue, sender: Any?) { + if segue.identifier == "ShowDetail" { + guard let indexPath = collectionView.indexPathsForSelectedItems?.first else { return } + let detailVC = segue.destination as! PhotoDetailViewController + detailVC.photo = photoReferences[indexPath.item] + } + } + + // MARK: - Private + + private func configureTitleView() { + + let font = UIFont.systemFont(ofSize: 30) + let attrs = [NSAttributedString.Key.font: font] + + let prevTitle = NSAttributedString(string: "<", attributes: attrs) + let prevButton = UIButton(type: .system) + prevButton.accessibilityIdentifier = "PhotosCollectionViewController.PreviousSolButton" + prevButton.setAttributedTitle(prevTitle, for: .normal) + prevButton.addTarget(self, action: #selector(goToPreviousSol(_:)), for: .touchUpInside) + + let nextTitle = NSAttributedString(string: ">", attributes: attrs) + let nextButton = UIButton(type: .system) + nextButton.setAttributedTitle(nextTitle, for: .normal) + nextButton.addTarget(self, action: #selector(goToNextSol(_:)), for: .touchUpInside) + nextButton.accessibilityIdentifier = "PhotosCollectionViewController.NextSolButton" + + let stackView = UIStackView(arrangedSubviews: [prevButton, solLabel, nextButton]) + stackView.axis = .horizontal + stackView.alignment = .fill + stackView.distribution = .fill + stackView.spacing = UIStackView.spacingUseSystem + + navigationItem.titleView = stackView + } + + private func updateViews() { + guard isViewLoaded else { return } + solLabel.text = "Sol \(solDescription?.sol ?? 0)" + } + + private func loadImage(forCell cell: ImageCollectionViewCell, forItemAt indexPath: IndexPath) { + let photoReference = photoReferences[indexPath.item] + // Check for image in cache + if let cachedImage = cache.value(for: photoReference.id) { + cell.imageView.image = cachedImage + return + } + + // Start an operation to fetch image data + let fetchOp = FetchPhotoOperation(photoReference: photoReference) + let cacheOp = BlockOperation { + if let image = fetchOp.image { + self.cache.cache(value: image, for: photoReference.id) + } + } + let completionOp = BlockOperation { + defer { self.operations.removeValue(forKey: photoReference.id) } + + if let currentIndexPath = self.collectionView?.indexPath(for: cell), + currentIndexPath != indexPath { + return // Cell has been reused + } + + if let image = fetchOp.image { + cell.imageView.image = image + } + } + + cacheOp.addDependency(fetchOp) + completionOp.addDependency(fetchOp) + + photoFetchQueue.addOperation(fetchOp) + photoFetchQueue.addOperation(cacheOp) + OperationQueue.main.addOperation(completionOp) + + operations[photoReference.id] = fetchOp + } + + // Properties + + private let client = JKMarsRoverClient() + private let cache = Cache() + private let photoFetchQueue = OperationQueue() + private var operations = [Int : Operation]() + + private var roverInfo: JKMarsRover? { + didSet { + solDescription = roverInfo?.solDescriptions[0] + } + } + + private var solDescription: JKSolDescription? { + didSet { + if let rover = roverInfo, + let sol = solDescription?.sol { + photoReferences = [] + client.fetchPhotos(from: rover, onSol: sol) { (photoRefs, error) in + if let e = error { NSLog("Error fetching photos for \(rover.name) on sol \(sol): \(e)"); return } + self.photoReferences = photoRefs ?? [] + DispatchQueue.main.async { self.updateViews() } + } + } + } + } + + private var photoReferences = [JKMarsPhotoReference]() { + didSet { + cache.clear() + DispatchQueue.main.async { self.collectionView?.reloadData() } + } + } + + @IBOutlet var collectionView: UICollectionView! + let solLabel = UILabel() +} diff --git a/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Views/ImageCollectionViewCell.swift b/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Views/ImageCollectionViewCell.swift new file mode 100644 index 00000000..f757c518 --- /dev/null +++ b/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Views/ImageCollectionViewCell.swift @@ -0,0 +1,23 @@ +// +// ImageCollectionViewCell.swift +// Astronomy-ObjC +// +// Created by TuneUp Shop on 3/4/19. +// Copyright © 2019 jkaunert. All rights reserved. +// + +import UIKit + +class ImageCollectionViewCell: UICollectionViewCell { + + override func prepareForReuse() { + super.prepareForReuse() + imageView.image = #imageLiteral(resourceName: "MarsPlaceholder") + } + + // MARK: Properties + + // MARK: IBOutlets + + @IBOutlet var imageView: UIImageView! +} diff --git a/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/main.m b/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/main.m new file mode 100644 index 00000000..a7f12e62 --- /dev/null +++ b/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/main.m @@ -0,0 +1,16 @@ +// +// main.m +// Astronomy-ObjC +// +// Created by TuneUp Shop on 3/4/19. +// Copyright © 2019 jkaunert. All rights reserved. +// + +#import +#import "AppDelegate.h" + +int main(int argc, char * argv[]) { + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); + } +} diff --git a/Sprint 6/Module 2-Custom Controls/CustomUIControl/CustomUIControl.xcodeproj/project.pbxproj b/Sprint 6/Module 2-Custom Controls/CustomUIControl/CustomUIControl.xcodeproj/project.pbxproj new file mode 100644 index 00000000..65515209 --- /dev/null +++ b/Sprint 6/Module 2-Custom Controls/CustomUIControl/CustomUIControl.xcodeproj/project.pbxproj @@ -0,0 +1,349 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXBuildFile section */ + AB69113421E53358002F040F /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = AB69113321E53358002F040F /* AppDelegate.swift */; }; + AB69113621E53358002F040F /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = AB69113521E53358002F040F /* ViewController.swift */; }; + AB69113921E53358002F040F /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = AB69113721E53358002F040F /* Main.storyboard */; }; + AB69113B21E53359002F040F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = AB69113A21E53359002F040F /* Assets.xcassets */; }; + AB69113E21E53359002F040F /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = AB69113C21E53359002F040F /* LaunchScreen.storyboard */; }; + AB69114621E546A3002F040F /* CustomControl.swift in Sources */ = {isa = PBXBuildFile; fileRef = AB69114521E546A3002F040F /* CustomControl.swift */; }; + AB7A041621E56ED2000BD2E7 /* UIViewExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = AB7A041521E56ED2000BD2E7 /* UIViewExtension.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + AB69113021E53358002F040F /* CustomUIControl.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CustomUIControl.app; sourceTree = BUILT_PRODUCTS_DIR; }; + AB69113321E53358002F040F /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + AB69113521E53358002F040F /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + AB69113821E53358002F040F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + AB69113A21E53359002F040F /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + AB69113D21E53359002F040F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + AB69113F21E53359002F040F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + AB69114521E546A3002F040F /* CustomControl.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomControl.swift; sourceTree = ""; }; + AB7A041521E56ED2000BD2E7 /* UIViewExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIViewExtension.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + AB69112D21E53358002F040F /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + AB69112721E53357002F040F = { + isa = PBXGroup; + children = ( + AB69113221E53358002F040F /* CustomUIControl */, + AB69113121E53358002F040F /* Products */, + ); + sourceTree = ""; + }; + AB69113121E53358002F040F /* Products */ = { + isa = PBXGroup; + children = ( + AB69113021E53358002F040F /* CustomUIControl.app */, + ); + name = Products; + sourceTree = ""; + }; + AB69113221E53358002F040F /* CustomUIControl */ = { + isa = PBXGroup; + children = ( + AB69113321E53358002F040F /* AppDelegate.swift */, + AB69113521E53358002F040F /* ViewController.swift */, + AB69114521E546A3002F040F /* CustomControl.swift */, + AB7A041521E56ED2000BD2E7 /* UIViewExtension.swift */, + AB69113721E53358002F040F /* Main.storyboard */, + AB69113A21E53359002F040F /* Assets.xcassets */, + AB69113C21E53359002F040F /* LaunchScreen.storyboard */, + AB69113F21E53359002F040F /* Info.plist */, + ); + path = CustomUIControl; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + AB69112F21E53358002F040F /* CustomUIControl */ = { + isa = PBXNativeTarget; + buildConfigurationList = AB69114221E53359002F040F /* Build configuration list for PBXNativeTarget "CustomUIControl" */; + buildPhases = ( + AB69112C21E53358002F040F /* Sources */, + AB69112D21E53358002F040F /* Frameworks */, + AB69112E21E53358002F040F /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = CustomUIControl; + productName = CustomUIControl; + productReference = AB69113021E53358002F040F /* CustomUIControl.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + AB69112821E53357002F040F /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 1010; + LastUpgradeCheck = 1010; + ORGANIZATIONNAME = jkaunert; + TargetAttributes = { + AB69112F21E53358002F040F = { + CreatedOnToolsVersion = 10.1; + }; + }; + }; + buildConfigurationList = AB69112B21E53357002F040F /* Build configuration list for PBXProject "CustomUIControl" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = AB69112721E53357002F040F; + productRefGroup = AB69113121E53358002F040F /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + AB69112F21E53358002F040F /* CustomUIControl */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + AB69112E21E53358002F040F /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + AB69113E21E53359002F040F /* LaunchScreen.storyboard in Resources */, + AB69113B21E53359002F040F /* Assets.xcassets in Resources */, + AB69113921E53358002F040F /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + AB69112C21E53358002F040F /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + AB69113621E53358002F040F /* ViewController.swift in Sources */, + AB69114621E546A3002F040F /* CustomControl.swift in Sources */, + AB7A041621E56ED2000BD2E7 /* UIViewExtension.swift in Sources */, + AB69113421E53358002F040F /* AppDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + AB69113721E53358002F040F /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + AB69113821E53358002F040F /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + AB69113C21E53359002F040F /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + AB69113D21E53359002F040F /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + AB69114021E53359002F040F /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.1; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + AB69114121E53359002F040F /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.1; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + AB69114321E53359002F040F /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = HSRQC9N69B; + INFOPLIST_FILE = CustomUIControl/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.jkaunert.CustomUIControl; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + AB69114421E53359002F040F /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = HSRQC9N69B; + INFOPLIST_FILE = CustomUIControl/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.jkaunert.CustomUIControl; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + AB69112B21E53357002F040F /* Build configuration list for PBXProject "CustomUIControl" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + AB69114021E53359002F040F /* Debug */, + AB69114121E53359002F040F /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + AB69114221E53359002F040F /* Build configuration list for PBXNativeTarget "CustomUIControl" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + AB69114321E53359002F040F /* Debug */, + AB69114421E53359002F040F /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = AB69112821E53357002F040F /* Project object */; +} diff --git a/Sprint 6/Module 2-Custom Controls/CustomUIControl/CustomUIControl/AppDelegate.swift b/Sprint 6/Module 2-Custom Controls/CustomUIControl/CustomUIControl/AppDelegate.swift new file mode 100644 index 00000000..e4a3a993 --- /dev/null +++ b/Sprint 6/Module 2-Custom Controls/CustomUIControl/CustomUIControl/AppDelegate.swift @@ -0,0 +1,46 @@ +// +// AppDelegate.swift +// CustomUIControl +// +// Created by TuneUp Shop on 1/8/19. +// Copyright © 2019 jkaunert. All rights reserved. +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + return true + } + + func applicationWillResignActive(_ application: UIApplication) { + // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. + } + + func applicationDidEnterBackground(_ application: UIApplication) { + // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. + } + + func applicationWillEnterForeground(_ application: UIApplication) { + // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. + } + + func applicationDidBecomeActive(_ application: UIApplication) { + // 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. + } + + func applicationWillTerminate(_ application: UIApplication) { + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. + } + + +} + diff --git a/Sprint 6/Module 2-Custom Controls/CustomUIControl/CustomUIControl/Assets.xcassets/AppIcon.appiconset/Contents.json b/Sprint 6/Module 2-Custom Controls/CustomUIControl/CustomUIControl/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000..d8db8d65 --- /dev/null +++ b/Sprint 6/Module 2-Custom Controls/CustomUIControl/CustomUIControl/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,98 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "83.5x83.5", + "scale" : "2x" + }, + { + "idiom" : "ios-marketing", + "size" : "1024x1024", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Sprint 6/Module 2-Custom Controls/CustomUIControl/CustomUIControl/Assets.xcassets/Contents.json b/Sprint 6/Module 2-Custom Controls/CustomUIControl/CustomUIControl/Assets.xcassets/Contents.json new file mode 100644 index 00000000..da4a164c --- /dev/null +++ b/Sprint 6/Module 2-Custom Controls/CustomUIControl/CustomUIControl/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Sprint 6/Module 2-Custom Controls/CustomUIControl/CustomUIControl/Base.lproj/LaunchScreen.storyboard b/Sprint 6/Module 2-Custom Controls/CustomUIControl/CustomUIControl/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 00000000..bfa36129 --- /dev/null +++ b/Sprint 6/Module 2-Custom Controls/CustomUIControl/CustomUIControl/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Sprint 6/Module 2-Custom Controls/CustomUIControl/CustomUIControl/Base.lproj/Main.storyboard b/Sprint 6/Module 2-Custom Controls/CustomUIControl/CustomUIControl/Base.lproj/Main.storyboard new file mode 100644 index 00000000..f6a89f00 --- /dev/null +++ b/Sprint 6/Module 2-Custom Controls/CustomUIControl/CustomUIControl/Base.lproj/Main.storyboard @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Sprint 6/Module 2-Custom Controls/CustomUIControl/CustomUIControl/CustomControl.swift b/Sprint 6/Module 2-Custom Controls/CustomUIControl/CustomUIControl/CustomControl.swift new file mode 100644 index 00000000..ee5c9f55 --- /dev/null +++ b/Sprint 6/Module 2-Custom Controls/CustomUIControl/CustomUIControl/CustomControl.swift @@ -0,0 +1,111 @@ +import Foundation +import UIKit + +class CustomControl: UIControl { + + static var starValue: Int = 1 + var labelArray: [UILabel] = [] + + private let componentDimension: CGFloat = 40.0 + private let componentCount = 5 + private let componentActiveColor = UIColor(red:0.70, green:0.87, blue:0.95, alpha:1.0) + private let componentInactiveColor = UIColor.gray + + + required init?(coder aCoder: NSCoder) { + super.init(coder: aCoder) + setup() + + } + + + func setup(){ + + var layoutX: CGFloat = 8.0 + for label in 1...5 { + let testLabel = UILabel(frame: CGRect(x: layoutX, y: 0, width: componentDimension, height: componentDimension)) + layoutX += componentDimension + 8.0 + testLabel.tag = label + testLabel.font = UIFont.boldSystemFont(ofSize: 32.0) + testLabel.textAlignment = .center + testLabel.text = "\u{2736}" + if testLabel.tag == 1 { + testLabel.textColor = componentActiveColor + }else { testLabel.textColor = componentInactiveColor } + labelArray.append(testLabel) + addSubview(testLabel) + clipsToBounds = true + } + } + + override var intrinsicContentSize: CGSize { + let componentsWidth = CGFloat(componentCount) * componentDimension + let componentsSpacing = CGFloat(componentCount + 1) * 8.0 + let width = componentsWidth + componentsSpacing + return CGSize(width: width, height: componentDimension) + } + + func updateValue(at touch: UITouch){ + + let touchPoint = touch.location(in: self) + for label in labelArray { +// let touchPoint = touch.location(in: self) + + if label.frame.contains(touchPoint) { + if label.textColor == componentInactiveColor { + CustomControl.starValue = label.tag + print(touchPoint, label.tag) + label.textColor = componentActiveColor + sendActions(for: .valueChanged) + }else if label.textColor == componentActiveColor { + CustomControl.starValue = label.tag - 1 + label.textColor = componentInactiveColor + sendActions(for: [.valueChanged]) + } + } + } + + } + + override func beginTracking(_ touch: UITouch, with event: UIEvent?) -> Bool { + updateValue(at: touch) + return true + } + + override func continueTracking(_ touch: UITouch, with event: UIEvent?) -> Bool { + + let touchPoint = touch.location(in: self) + if bounds.contains(touchPoint) { + sendActions(for: [.touchDragInside]) + updateValue(at: touch) + } else { + sendActions(for: [.touchDragOutside]) + } + return true + } + + override func endTracking(_ touch: UITouch?, with event: UIEvent?) { + + defer { super.endTracking(touch, with: event) } // makes sure super is called in EVERY code path + guard let touch = touch else {return} + let touchPoint = touch.location(in: self) + if bounds.contains(touchPoint) { + sendActions(for: [.touchUpInside]) + //updateValue(at: touch) + + } else { + + sendActions(for: [.touchUpOutside]) + } + } + + override func cancelTracking(with event: UIEvent?) { + + sendActions(for: [.touchCancel]) + super.cancelTracking(with: event) + } + + + + +} diff --git a/Sprint 6/Module 2-Custom Controls/CustomUIControl/CustomUIControl/Info.plist b/Sprint 6/Module 2-Custom Controls/CustomUIControl/CustomUIControl/Info.plist new file mode 100644 index 00000000..16be3b68 --- /dev/null +++ b/Sprint 6/Module 2-Custom Controls/CustomUIControl/CustomUIControl/Info.plist @@ -0,0 +1,45 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/Sprint 6/Module 2-Custom Controls/CustomUIControl/CustomUIControl/UIViewExtension.swift b/Sprint 6/Module 2-Custom Controls/CustomUIControl/CustomUIControl/UIViewExtension.swift new file mode 100644 index 00000000..9150d72e --- /dev/null +++ b/Sprint 6/Module 2-Custom Controls/CustomUIControl/CustomUIControl/UIViewExtension.swift @@ -0,0 +1,14 @@ +import Foundation +import UIKit + +extension UIView { + // "Flare view" animation sequence + func performFlare() { + func flare() { transform = CGAffineTransform(scaleX: 1.6, y: 1.6) } + func unflare() { transform = .identity } + + UIView.animate(withDuration: 0.3, + animations: { flare() }, + completion: { _ in UIView.animate(withDuration: 0.1) { unflare() }}) + } +} diff --git a/Sprint 6/Module 2-Custom Controls/CustomUIControl/CustomUIControl/ViewController.swift b/Sprint 6/Module 2-Custom Controls/CustomUIControl/CustomUIControl/ViewController.swift new file mode 100644 index 00000000..19254909 --- /dev/null +++ b/Sprint 6/Module 2-Custom Controls/CustomUIControl/CustomUIControl/ViewController.swift @@ -0,0 +1,22 @@ +import UIKit + +class ViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + // Do any additional setup after loading the view, typically from a nib. + } + + @IBAction func updateRating(_ ratingControl: CustomControl) { + view.performFlare() + switch CustomControl.starValue { + case 1: title = "User Rating: \(CustomControl.starValue) star" + default: title = "User Rating: \(CustomControl.starValue) stars" + } + + } + + + +} + diff --git a/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUI/LoadingUI.xcodeproj/project.pbxproj b/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUI/LoadingUI.xcodeproj/project.pbxproj new file mode 100644 index 00000000..30c4f4f9 --- /dev/null +++ b/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUI/LoadingUI.xcodeproj/project.pbxproj @@ -0,0 +1,482 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXBuildFile section */ + AB3A0E9B2214BA8800BE8432 /* LoadingUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AB3A0E912214BA8800BE8432 /* LoadingUI.framework */; }; + AB3A0EA02214BA8800BE8432 /* LoadingUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = AB3A0E9F2214BA8800BE8432 /* LoadingUITests.swift */; }; + AB3A0EA22214BA8800BE8432 /* LoadingUI.h in Headers */ = {isa = PBXBuildFile; fileRef = AB3A0E942214BA8800BE8432 /* LoadingUI.h */; settings = {ATTRIBUTES = (Public, ); }; }; + AB3A0ECB2214BD0200BE8432 /* LoadingViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = AB3A0EC92214BD0200BE8432 /* LoadingViewController.swift */; }; + AB3A0ECE2214BE5700BE8432 /* IndeterminateLoadingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = AB3A0ECD2214BE5700BE8432 /* IndeterminateLoadingView.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + AB3A0E9C2214BA8800BE8432 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = AB3A0E882214BA8800BE8432 /* Project object */; + proxyType = 1; + remoteGlobalIDString = AB3A0E902214BA8800BE8432; + remoteInfo = LoadingUI; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + AB3A0E912214BA8800BE8432 /* LoadingUI.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = LoadingUI.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + AB3A0E942214BA8800BE8432 /* LoadingUI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LoadingUI.h; sourceTree = ""; }; + AB3A0E952214BA8800BE8432 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + AB3A0E9A2214BA8800BE8432 /* LoadingUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = LoadingUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + AB3A0E9F2214BA8800BE8432 /* LoadingUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingUITests.swift; sourceTree = ""; }; + AB3A0EA12214BA8800BE8432 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + AB3A0EC92214BD0200BE8432 /* LoadingViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingViewController.swift; sourceTree = ""; }; + AB3A0ECD2214BE5700BE8432 /* IndeterminateLoadingView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IndeterminateLoadingView.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + AB3A0E8E2214BA8800BE8432 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + AB3A0E972214BA8800BE8432 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + AB3A0E9B2214BA8800BE8432 /* LoadingUI.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + AB3A0E872214BA8800BE8432 = { + isa = PBXGroup; + children = ( + AB3A0E932214BA8800BE8432 /* LoadingUI */, + AB3A0E9E2214BA8800BE8432 /* LoadingUITests */, + AB3A0E922214BA8800BE8432 /* Products */, + ); + sourceTree = ""; + }; + AB3A0E922214BA8800BE8432 /* Products */ = { + isa = PBXGroup; + children = ( + AB3A0E912214BA8800BE8432 /* LoadingUI.framework */, + AB3A0E9A2214BA8800BE8432 /* LoadingUITests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + AB3A0E932214BA8800BE8432 /* LoadingUI */ = { + isa = PBXGroup; + children = ( + AB3A0E942214BA8800BE8432 /* LoadingUI.h */, + AB3A0ECF2214BEB100BE8432 /* View Controllers */, + AB3A0E952214BA8800BE8432 /* Info.plist */, + ); + path = LoadingUI; + sourceTree = ""; + }; + AB3A0E9E2214BA8800BE8432 /* LoadingUITests */ = { + isa = PBXGroup; + children = ( + AB3A0E9F2214BA8800BE8432 /* LoadingUITests.swift */, + AB3A0EA12214BA8800BE8432 /* Info.plist */, + ); + path = LoadingUITests; + sourceTree = ""; + }; + AB3A0ECF2214BEB100BE8432 /* View Controllers */ = { + isa = PBXGroup; + children = ( + AB3A0ECD2214BE5700BE8432 /* IndeterminateLoadingView.swift */, + AB3A0EC92214BD0200BE8432 /* LoadingViewController.swift */, + ); + path = "View Controllers"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + AB3A0E8C2214BA8800BE8432 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + AB3A0EA22214BA8800BE8432 /* LoadingUI.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + AB3A0E902214BA8800BE8432 /* LoadingUI */ = { + isa = PBXNativeTarget; + buildConfigurationList = AB3A0EA52214BA8800BE8432 /* Build configuration list for PBXNativeTarget "LoadingUI" */; + buildPhases = ( + AB3A0E8C2214BA8800BE8432 /* Headers */, + AB3A0E8D2214BA8800BE8432 /* Sources */, + AB3A0E8E2214BA8800BE8432 /* Frameworks */, + AB3A0E8F2214BA8800BE8432 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = LoadingUI; + productName = LoadingUI; + productReference = AB3A0E912214BA8800BE8432 /* LoadingUI.framework */; + productType = "com.apple.product-type.framework"; + }; + AB3A0E992214BA8800BE8432 /* LoadingUITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = AB3A0EA82214BA8800BE8432 /* Build configuration list for PBXNativeTarget "LoadingUITests" */; + buildPhases = ( + AB3A0E962214BA8800BE8432 /* Sources */, + AB3A0E972214BA8800BE8432 /* Frameworks */, + AB3A0E982214BA8800BE8432 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + AB3A0E9D2214BA8800BE8432 /* PBXTargetDependency */, + ); + name = LoadingUITests; + productName = LoadingUITests; + productReference = AB3A0E9A2214BA8800BE8432 /* LoadingUITests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + AB3A0E882214BA8800BE8432 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 1010; + LastUpgradeCheck = 1010; + ORGANIZATIONNAME = jkaunert; + TargetAttributes = { + AB3A0E902214BA8800BE8432 = { + CreatedOnToolsVersion = 10.1; + LastSwiftMigration = 1010; + }; + AB3A0E992214BA8800BE8432 = { + CreatedOnToolsVersion = 10.1; + }; + }; + }; + buildConfigurationList = AB3A0E8B2214BA8800BE8432 /* Build configuration list for PBXProject "LoadingUI" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = AB3A0E872214BA8800BE8432; + productRefGroup = AB3A0E922214BA8800BE8432 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + AB3A0E902214BA8800BE8432 /* LoadingUI */, + AB3A0E992214BA8800BE8432 /* LoadingUITests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + AB3A0E8F2214BA8800BE8432 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + AB3A0E982214BA8800BE8432 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + AB3A0E8D2214BA8800BE8432 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + AB3A0ECB2214BD0200BE8432 /* LoadingViewController.swift in Sources */, + AB3A0ECE2214BE5700BE8432 /* IndeterminateLoadingView.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + AB3A0E962214BA8800BE8432 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + AB3A0EA02214BA8800BE8432 /* LoadingUITests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + AB3A0E9D2214BA8800BE8432 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = AB3A0E902214BA8800BE8432 /* LoadingUI */; + targetProxy = AB3A0E9C2214BA8800BE8432 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + AB3A0EA32214BA8800BE8432 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.1; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + AB3A0EA42214BA8800BE8432 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.1; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + AB3A0EA62214BA8800BE8432 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_IDENTITY = ""; + CODE_SIGN_STYLE = Automatic; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = HSRQC9N69B; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = LoadingUI/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.jkaunert.LoadingUI; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + AB3A0EA72214BA8800BE8432 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_IDENTITY = ""; + CODE_SIGN_STYLE = Automatic; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = HSRQC9N69B; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = LoadingUI/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.jkaunert.LoadingUI; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = YES; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + AB3A0EA92214BA8800BE8432 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = HSRQC9N69B; + INFOPLIST_FILE = LoadingUITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.jkaunert.LoadingUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + AB3A0EAA2214BA8800BE8432 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = HSRQC9N69B; + INFOPLIST_FILE = LoadingUITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.jkaunert.LoadingUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + AB3A0E8B2214BA8800BE8432 /* Build configuration list for PBXProject "LoadingUI" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + AB3A0EA32214BA8800BE8432 /* Debug */, + AB3A0EA42214BA8800BE8432 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + AB3A0EA52214BA8800BE8432 /* Build configuration list for PBXNativeTarget "LoadingUI" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + AB3A0EA62214BA8800BE8432 /* Debug */, + AB3A0EA72214BA8800BE8432 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + AB3A0EA82214BA8800BE8432 /* Build configuration list for PBXNativeTarget "LoadingUITests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + AB3A0EA92214BA8800BE8432 /* Debug */, + AB3A0EAA2214BA8800BE8432 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = AB3A0E882214BA8800BE8432 /* Project object */; +} diff --git a/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUI/LoadingUI/Info.plist b/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUI/LoadingUI/Info.plist new file mode 100644 index 00000000..e1fe4cfb --- /dev/null +++ b/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUI/LoadingUI/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + + diff --git a/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUI/LoadingUI/LoadingUI.h b/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUI/LoadingUI/LoadingUI.h new file mode 100644 index 00000000..f0a6a134 --- /dev/null +++ b/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUI/LoadingUI/LoadingUI.h @@ -0,0 +1,19 @@ +// +// LoadingUI.h +// LoadingUI +// +// Created by TuneUp Shop on 2/13/19. +// Copyright © 2019 jkaunert. All rights reserved. +// + +#import + +//! Project version number for LoadingUI. +FOUNDATION_EXPORT double LoadingUIVersionNumber; + +//! Project version string for LoadingUI. +FOUNDATION_EXPORT const unsigned char LoadingUIVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + + diff --git a/Sprint 9/Creating Frameworks/IndeterminateLoadingView.swift b/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUI/LoadingUI/View Controllers/IndeterminateLoadingView.swift similarity index 91% rename from Sprint 9/Creating Frameworks/IndeterminateLoadingView.swift rename to Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUI/LoadingUI/View Controllers/IndeterminateLoadingView.swift index 18a7145d..e22f132f 100644 --- a/Sprint 9/Creating Frameworks/IndeterminateLoadingView.swift +++ b/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUI/LoadingUI/View Controllers/IndeterminateLoadingView.swift @@ -8,7 +8,7 @@ import UIKit -class IndeterminateLoadingView: UIView, CAAnimationDelegate { +internal class IndeterminateLoadingView: UIView, CAAnimationDelegate { override init(frame: CGRect) { super.init(frame: frame) @@ -16,20 +16,20 @@ class IndeterminateLoadingView: UIView, CAAnimationDelegate { setupShapeLayer() } - required init?(coder aDecoder: NSCoder) { + internal required init?(coder aDecoder: NSCoder) { super.init(coder: aDecoder) setupShapeLayer() } - func startAnimating() { + internal func startAnimating() { guard !isAnimating else { return } defer { isAnimating = true } startAnimation() } - func stopAnimating() { + internal func stopAnimating() { guard isAnimating else { return } shouldStopAnimationOnNextCycle = true @@ -75,7 +75,7 @@ class IndeterminateLoadingView: UIView, CAAnimationDelegate { // MARK: - CAAnimationDelegate - func animationDidStop(_ anim: CAAnimation, finished flag: Bool) { + internal func animationDidStop(_ anim: CAAnimation, finished flag: Bool) { guard !shouldStopAnimationOnNextCycle else { shouldStopAnimationOnNextCycle = false isAnimating = false diff --git a/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUI/LoadingUI/View Controllers/LoadingViewController.swift b/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUI/LoadingUI/View Controllers/LoadingViewController.swift new file mode 100644 index 00000000..a3ff1aa4 --- /dev/null +++ b/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUI/LoadingUI/View Controllers/LoadingViewController.swift @@ -0,0 +1,55 @@ +// +// LoadingViewController.swift +// LoadingUI +// +// Created by TuneUp Shop on 2/13/19. +// Copyright © 2019 jkaunert. All rights reserved. +// + +import UIKit + +open class LoadingViewController: UIViewController { + + let IMAGE_SIZE: CGFloat = 100 + let OFFSET: CGFloat = 0 + + override open func viewWillAppear(_ animated: Bool) { + super.viewWillAppear(animated) + + } + + override open func viewDidLoad() { + super.viewDidLoad() + + let loader = IndeterminateLoadingView(frame: CGRect(x: 0.0, y: 0.0, width: 100.0, height: 100.0)) + self.view.addSubview(loader) + + //FIXME: - add constraints here + loader.center = self.view.center + loader.translatesAutoresizingMaskIntoConstraints = false + loader.widthAnchor.constraint(equalToConstant: IMAGE_SIZE).isActive = true + loader.heightAnchor.constraint(equalToConstant: IMAGE_SIZE).isActive = true + loader.centerXAnchor.constraint(lessThanOrEqualTo: self.view.centerXAnchor).isActive = true + loader.centerYAnchor.constraint(lessThanOrEqualTo: self.view.centerYAnchor, constant: OFFSET).isActive = true + + loader.startAnimating() + // Do any additional setup after loading the view. + } + + + /* + // MARK: - Navigation + + // In a storyboard-based application, you will often want to do a little preparation before navigation + override func prepare(for segue: UIStoryboardSegue, sender: Any?) { + // Get the new view controller using segue.destination. + // Pass the selected object to the new view controller. + } + */ + + + @IBAction func dismissModal(_ sender: Any) { + self.dismiss(animated: true, completion: nil) + } + +} diff --git a/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUI/LoadingUITests/Info.plist b/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUI/LoadingUITests/Info.plist new file mode 100644 index 00000000..6c40a6cd --- /dev/null +++ b/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUI/LoadingUITests/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUI/LoadingUITests/LoadingUITests.swift b/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUI/LoadingUITests/LoadingUITests.swift new file mode 100644 index 00000000..8d4dd33b --- /dev/null +++ b/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUI/LoadingUITests/LoadingUITests.swift @@ -0,0 +1,34 @@ +// +// LoadingUITests.swift +// LoadingUITests +// +// Created by TuneUp Shop on 2/13/19. +// Copyright © 2019 jkaunert. All rights reserved. +// + +import XCTest +@testable import LoadingUI + +class LoadingUITests: XCTestCase { + + override func setUp() { + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + } + + func testExample() { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct results. + } + + func testPerformanceExample() { + // This is an example of a performance test case. + self.measure { + // Put the code you want to measure the time of here. + } + } + +} diff --git a/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUIDemoApp/LoadingUIDemoApp.xcodeproj/project.pbxproj b/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUIDemoApp/LoadingUIDemoApp.xcodeproj/project.pbxproj new file mode 100644 index 00000000..d1993684 --- /dev/null +++ b/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUIDemoApp/LoadingUIDemoApp.xcodeproj/project.pbxproj @@ -0,0 +1,361 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXBuildFile section */ + AB3A0EB82214BAE100BE8432 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = AB3A0EB72214BAE100BE8432 /* AppDelegate.swift */; }; + AB3A0EBA2214BAE100BE8432 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = AB3A0EB92214BAE100BE8432 /* ViewController.swift */; }; + AB3A0EBD2214BAE100BE8432 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = AB3A0EBB2214BAE100BE8432 /* Main.storyboard */; }; + AB3A0EBF2214BAE200BE8432 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = AB3A0EBE2214BAE200BE8432 /* Assets.xcassets */; }; + AB3A0EC22214BAE200BE8432 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = AB3A0EC02214BAE200BE8432 /* LaunchScreen.storyboard */; }; + AB3A0ED12214C6AB00BE8432 /* LoadingUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AB3A0ED02214C6AB00BE8432 /* LoadingUI.framework */; }; + AB3A0ED22214C6AB00BE8432 /* LoadingUI.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = AB3A0ED02214C6AB00BE8432 /* LoadingUI.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + AB3A0ED32214C6AB00BE8432 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + AB3A0ED22214C6AB00BE8432 /* LoadingUI.framework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + AB3A0EB42214BAE100BE8432 /* LoadingUIDemoApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = LoadingUIDemoApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; + AB3A0EB72214BAE100BE8432 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + AB3A0EB92214BAE100BE8432 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + AB3A0EBC2214BAE100BE8432 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + AB3A0EBE2214BAE200BE8432 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + AB3A0EC12214BAE200BE8432 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + AB3A0EC32214BAE200BE8432 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + AB3A0ED02214C6AB00BE8432 /* LoadingUI.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = LoadingUI.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + AB3A0EB12214BAE100BE8432 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + AB3A0ED12214C6AB00BE8432 /* LoadingUI.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + AB3A0EAB2214BAE100BE8432 = { + isa = PBXGroup; + children = ( + AB3A0ED02214C6AB00BE8432 /* LoadingUI.framework */, + AB3A0EB62214BAE100BE8432 /* LoadingUIDemoApp */, + AB3A0EB52214BAE100BE8432 /* Products */, + ); + sourceTree = ""; + }; + AB3A0EB52214BAE100BE8432 /* Products */ = { + isa = PBXGroup; + children = ( + AB3A0EB42214BAE100BE8432 /* LoadingUIDemoApp.app */, + ); + name = Products; + sourceTree = ""; + }; + AB3A0EB62214BAE100BE8432 /* LoadingUIDemoApp */ = { + isa = PBXGroup; + children = ( + AB3A0EB72214BAE100BE8432 /* AppDelegate.swift */, + AB3A0EB92214BAE100BE8432 /* ViewController.swift */, + AB3A0EBB2214BAE100BE8432 /* Main.storyboard */, + AB3A0EBE2214BAE200BE8432 /* Assets.xcassets */, + AB3A0EC02214BAE200BE8432 /* LaunchScreen.storyboard */, + AB3A0EC32214BAE200BE8432 /* Info.plist */, + ); + path = LoadingUIDemoApp; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + AB3A0EB32214BAE100BE8432 /* LoadingUIDemoApp */ = { + isa = PBXNativeTarget; + buildConfigurationList = AB3A0EC62214BAE200BE8432 /* Build configuration list for PBXNativeTarget "LoadingUIDemoApp" */; + buildPhases = ( + AB3A0EB02214BAE100BE8432 /* Sources */, + AB3A0EB12214BAE100BE8432 /* Frameworks */, + AB3A0EB22214BAE100BE8432 /* Resources */, + AB3A0ED32214C6AB00BE8432 /* Embed Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = LoadingUIDemoApp; + productName = LoadingUIDemoApp; + productReference = AB3A0EB42214BAE100BE8432 /* LoadingUIDemoApp.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + AB3A0EAC2214BAE100BE8432 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 1010; + LastUpgradeCheck = 1010; + ORGANIZATIONNAME = jkaunert; + TargetAttributes = { + AB3A0EB32214BAE100BE8432 = { + CreatedOnToolsVersion = 10.1; + }; + }; + }; + buildConfigurationList = AB3A0EAF2214BAE100BE8432 /* Build configuration list for PBXProject "LoadingUIDemoApp" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = AB3A0EAB2214BAE100BE8432; + productRefGroup = AB3A0EB52214BAE100BE8432 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + AB3A0EB32214BAE100BE8432 /* LoadingUIDemoApp */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + AB3A0EB22214BAE100BE8432 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + AB3A0EC22214BAE200BE8432 /* LaunchScreen.storyboard in Resources */, + AB3A0EBF2214BAE200BE8432 /* Assets.xcassets in Resources */, + AB3A0EBD2214BAE100BE8432 /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + AB3A0EB02214BAE100BE8432 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + AB3A0EBA2214BAE100BE8432 /* ViewController.swift in Sources */, + AB3A0EB82214BAE100BE8432 /* AppDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + AB3A0EBB2214BAE100BE8432 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + AB3A0EBC2214BAE100BE8432 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + AB3A0EC02214BAE200BE8432 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + AB3A0EC12214BAE200BE8432 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + AB3A0EC42214BAE200BE8432 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.1; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + AB3A0EC52214BAE200BE8432 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.1; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + AB3A0EC72214BAE200BE8432 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = HSRQC9N69B; + INFOPLIST_FILE = LoadingUIDemoApp/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.jkaunert.LoadingUIDemoApp; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + AB3A0EC82214BAE200BE8432 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = HSRQC9N69B; + INFOPLIST_FILE = LoadingUIDemoApp/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.jkaunert.LoadingUIDemoApp; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + AB3A0EAF2214BAE100BE8432 /* Build configuration list for PBXProject "LoadingUIDemoApp" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + AB3A0EC42214BAE200BE8432 /* Debug */, + AB3A0EC52214BAE200BE8432 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + AB3A0EC62214BAE200BE8432 /* Build configuration list for PBXNativeTarget "LoadingUIDemoApp" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + AB3A0EC72214BAE200BE8432 /* Debug */, + AB3A0EC82214BAE200BE8432 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = AB3A0EAC2214BAE100BE8432 /* Project object */; +} diff --git a/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUIDemoApp/LoadingUIDemoApp/AppDelegate.swift b/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUIDemoApp/LoadingUIDemoApp/AppDelegate.swift new file mode 100644 index 00000000..b6ee03b0 --- /dev/null +++ b/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUIDemoApp/LoadingUIDemoApp/AppDelegate.swift @@ -0,0 +1,46 @@ +// +// AppDelegate.swift +// LoadingUIDemoApp +// +// Created by TuneUp Shop on 2/13/19. +// Copyright © 2019 jkaunert. All rights reserved. +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + return true + } + + func applicationWillResignActive(_ application: UIApplication) { + // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. + } + + func applicationDidEnterBackground(_ application: UIApplication) { + // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. + } + + func applicationWillEnterForeground(_ application: UIApplication) { + // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. + } + + func applicationDidBecomeActive(_ application: UIApplication) { + // 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. + } + + func applicationWillTerminate(_ application: UIApplication) { + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. + } + + +} + diff --git a/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUIDemoApp/LoadingUIDemoApp/Assets.xcassets/AppIcon.appiconset/Contents.json b/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUIDemoApp/LoadingUIDemoApp/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000..d8db8d65 --- /dev/null +++ b/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUIDemoApp/LoadingUIDemoApp/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,98 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "83.5x83.5", + "scale" : "2x" + }, + { + "idiom" : "ios-marketing", + "size" : "1024x1024", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUIDemoApp/LoadingUIDemoApp/Assets.xcassets/Contents.json b/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUIDemoApp/LoadingUIDemoApp/Assets.xcassets/Contents.json new file mode 100644 index 00000000..da4a164c --- /dev/null +++ b/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUIDemoApp/LoadingUIDemoApp/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUIDemoApp/LoadingUIDemoApp/Base.lproj/LaunchScreen.storyboard b/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUIDemoApp/LoadingUIDemoApp/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 00000000..bfa36129 --- /dev/null +++ b/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUIDemoApp/LoadingUIDemoApp/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUIDemoApp/LoadingUIDemoApp/Base.lproj/Main.storyboard b/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUIDemoApp/LoadingUIDemoApp/Base.lproj/Main.storyboard new file mode 100644 index 00000000..63649eef --- /dev/null +++ b/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUIDemoApp/LoadingUIDemoApp/Base.lproj/Main.storyboard @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUIDemoApp/LoadingUIDemoApp/Info.plist b/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUIDemoApp/LoadingUIDemoApp/Info.plist new file mode 100644 index 00000000..16be3b68 --- /dev/null +++ b/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUIDemoApp/LoadingUIDemoApp/Info.plist @@ -0,0 +1,45 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUIDemoApp/LoadingUIDemoApp/ViewController.swift b/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUIDemoApp/LoadingUIDemoApp/ViewController.swift new file mode 100644 index 00000000..c0225d75 --- /dev/null +++ b/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUIDemoApp/LoadingUIDemoApp/ViewController.swift @@ -0,0 +1,21 @@ +// +// ViewController.swift +// LoadingUIDemoApp +// +// Created by TuneUp Shop on 2/13/19. +// Copyright © 2019 jkaunert. All rights reserved. +// + +import UIKit +import LoadingUI + + +class ViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + // Do any additional setup after loading the view, typically from a nib. + } + +} +