From c5f71bd0160603acfd40fbcc1630f77d9a140d14 Mon Sep 17 00:00:00 2001 From: jkaunert <44586402+jkaunert@users.noreply.github.com> Date: Tue, 8 Jan 2019 16:38:27 -0600 Subject: [PATCH 01/16] sets up project, implements custom control class and builds the control view. --- .../CustomUIControl.xcodeproj/project.pbxproj | 345 ++++++++++++++++++ .../CustomUIControl/AppDelegate.swift | 46 +++ .../AppIcon.appiconset/Contents.json | 98 +++++ .../Assets.xcassets/Contents.json | 6 + .../Base.lproj/LaunchScreen.storyboard | 25 ++ .../Base.lproj/Main.storyboard | 61 ++++ .../CustomUIControl/CustomControl.swift | 50 +++ .../CustomUIControl/Info.plist | 45 +++ .../CustomUIControl/ViewController.swift | 21 ++ 9 files changed, 697 insertions(+) create mode 100644 Sprint 6/Module 2-Custom Controls/CustomUIControl/CustomUIControl.xcodeproj/project.pbxproj create mode 100644 Sprint 6/Module 2-Custom Controls/CustomUIControl/CustomUIControl/AppDelegate.swift create mode 100644 Sprint 6/Module 2-Custom Controls/CustomUIControl/CustomUIControl/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 Sprint 6/Module 2-Custom Controls/CustomUIControl/CustomUIControl/Assets.xcassets/Contents.json create mode 100644 Sprint 6/Module 2-Custom Controls/CustomUIControl/CustomUIControl/Base.lproj/LaunchScreen.storyboard create mode 100644 Sprint 6/Module 2-Custom Controls/CustomUIControl/CustomUIControl/Base.lproj/Main.storyboard create mode 100644 Sprint 6/Module 2-Custom Controls/CustomUIControl/CustomUIControl/CustomControl.swift create mode 100644 Sprint 6/Module 2-Custom Controls/CustomUIControl/CustomUIControl/Info.plist create mode 100644 Sprint 6/Module 2-Custom Controls/CustomUIControl/CustomUIControl/ViewController.swift 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..d3255b76 --- /dev/null +++ b/Sprint 6/Module 2-Custom Controls/CustomUIControl/CustomUIControl.xcodeproj/project.pbxproj @@ -0,0 +1,345 @@ +// !$*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 */; }; +/* 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 = ""; }; +/* 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 */, + 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 */, + 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..c6e8de5b --- /dev/null +++ b/Sprint 6/Module 2-Custom Controls/CustomUIControl/CustomUIControl/Base.lproj/Main.storyboard @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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..b82d9a1f --- /dev/null +++ b/Sprint 6/Module 2-Custom Controls/CustomUIControl/CustomUIControl/CustomControl.swift @@ -0,0 +1,50 @@ +import Foundation +import UIKit + +class CustomControl: UIControl { + + static let value: Int = 1 + + private let componentDimension: CGFloat = 40.0 + private let componentCount = 5 + private let componentActiveColor = UIColor.black + private let componentInactiveColor = UIColor.gray + + + required init?(coder aCoder: NSCoder) { + super.init(coder: aCoder) + setup() + + } + + + func setup(){ + + var labelArray: [UILabel] = [] + var layoutX: CGFloat = 8.0 + for label in 1...5 { + let testLabel = UILabel(frame: CGRect(x: layoutX, y: 0, width: componentDimension, height: componentDimension)) + //testLabel.center = CGPoint(x: layoutX, y: 0) + layoutX += componentDimension + 8.0 + print(layoutX) + testLabel.tag = label + print(testLabel.tag) + testLabel.font = UIFont.boldSystemFont(ofSize: 32.0) + testLabel.textAlignment = .center + testLabel.text = "\u{2736}" + labelArray.append(testLabel) + addSubview(testLabel) + } + } + + 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) + } + + + + +} 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/ViewController.swift b/Sprint 6/Module 2-Custom Controls/CustomUIControl/CustomUIControl/ViewController.swift new file mode 100644 index 00000000..1bbd376b --- /dev/null +++ b/Sprint 6/Module 2-Custom Controls/CustomUIControl/CustomUIControl/ViewController.swift @@ -0,0 +1,21 @@ +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) { + switch CustomControl.value { + case 1: title = "User Rating: \(CustomControl.value) star" + default: title = "User Rating: \(CustomControl.value) stars" + } + + } + + + +} + From e76fbbdc3f31396756aa16030a106c97ee934cae Mon Sep 17 00:00:00 2001 From: jkaunert <44586402+jkaunert@users.noreply.github.com> Date: Tue, 8 Jan 2019 18:23:56 -0600 Subject: [PATCH 02/16] implements touch handlers and skeleton of updatValue function. --- .../CustomUIControl.xcodeproj/project.pbxproj | 4 ++ .../Base.lproj/Main.storyboard | 1 - .../CustomUIControl/CustomControl.swift | 56 +++++++++++++++++-- .../CustomUIControl/UIViewExtension.swift | 14 +++++ .../CustomUIControl/ViewController.swift | 10 ++-- 5 files changed, 74 insertions(+), 11 deletions(-) create mode 100644 Sprint 6/Module 2-Custom Controls/CustomUIControl/CustomUIControl/UIViewExtension.swift 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 index d3255b76..65515209 100644 --- a/Sprint 6/Module 2-Custom Controls/CustomUIControl/CustomUIControl.xcodeproj/project.pbxproj +++ b/Sprint 6/Module 2-Custom Controls/CustomUIControl/CustomUIControl.xcodeproj/project.pbxproj @@ -13,6 +13,7 @@ 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 */ @@ -24,6 +25,7 @@ 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 */ @@ -59,6 +61,7 @@ AB69113321E53358002F040F /* AppDelegate.swift */, AB69113521E53358002F040F /* ViewController.swift */, AB69114521E546A3002F040F /* CustomControl.swift */, + AB7A041521E56ED2000BD2E7 /* UIViewExtension.swift */, AB69113721E53358002F040F /* Main.storyboard */, AB69113A21E53359002F040F /* Assets.xcassets */, AB69113C21E53359002F040F /* LaunchScreen.storyboard */, @@ -140,6 +143,7 @@ files = ( AB69113621E53358002F040F /* ViewController.swift in Sources */, AB69114621E546A3002F040F /* CustomControl.swift in Sources */, + AB7A041621E56ED2000BD2E7 /* UIViewExtension.swift in Sources */, AB69113421E53358002F040F /* AppDelegate.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; 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 index c6e8de5b..19f5fa23 100644 --- 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 @@ -20,7 +20,6 @@ - diff --git a/Sprint 6/Module 2-Custom Controls/CustomUIControl/CustomUIControl/CustomControl.swift b/Sprint 6/Module 2-Custom Controls/CustomUIControl/CustomUIControl/CustomControl.swift index b82d9a1f..3253b7ad 100644 --- a/Sprint 6/Module 2-Custom Controls/CustomUIControl/CustomUIControl/CustomControl.swift +++ b/Sprint 6/Module 2-Custom Controls/CustomUIControl/CustomUIControl/CustomControl.swift @@ -3,11 +3,13 @@ import UIKit class CustomControl: UIControl { - static let value: Int = 1 + static var starValue: Int = 1 + //let localStarValue: Int = 1 + var labelArray: [UILabel] = [] private let componentDimension: CGFloat = 40.0 private let componentCount = 5 - private let componentActiveColor = UIColor.black + private let componentActiveColor = UIColor(red:0.70, green:0.87, blue:0.95, alpha:1.0) private let componentInactiveColor = UIColor.gray @@ -20,18 +22,18 @@ class CustomControl: UIControl { func setup(){ - var labelArray: [UILabel] = [] + //var labelArray: [UILabel] = [] var layoutX: CGFloat = 8.0 for label in 1...5 { let testLabel = UILabel(frame: CGRect(x: layoutX, y: 0, width: componentDimension, height: componentDimension)) - //testLabel.center = CGPoint(x: layoutX, y: 0) layoutX += componentDimension + 8.0 - print(layoutX) testLabel.tag = label - print(testLabel.tag) 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) } @@ -44,6 +46,48 @@ class CustomControl: UIControl { return CGSize(width: width, height: componentDimension) } + func updateValue(at touch: UITouch){ + + } + + 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) { + updateValue(at: touch) + sendActions(for: [.touchUpInside]) + + } 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/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 index 1bbd376b..64a0669c 100644 --- a/Sprint 6/Module 2-Custom Controls/CustomUIControl/CustomUIControl/ViewController.swift +++ b/Sprint 6/Module 2-Custom Controls/CustomUIControl/CustomUIControl/ViewController.swift @@ -8,10 +8,12 @@ class ViewController: UIViewController { } @IBAction func updateRating(_ ratingControl: CustomControl) { - switch CustomControl.value { - case 1: title = "User Rating: \(CustomControl.value) star" - default: title = "User Rating: \(CustomControl.value) stars" - } + + title = "User Rating: \(CustomControl.starValue) stars" +// switch CustomControl.starValue { +// case 1: title = "User Rating: \(CustomControl.starValue) star" +// default: title = "User Rating: \(CustomControl.starValue) stars" +// } } From 80baac974f6e21ef2bf0d30f970939e25e58e359 Mon Sep 17 00:00:00 2001 From: jkaunert <44586402+jkaunert@users.noreply.github.com> Date: Wed, 9 Jan 2019 01:19:51 -0600 Subject: [PATCH 03/16] implements MVP, stretch goals. Introduces bugs when sliding across control. --- .../Base.lproj/Main.storyboard | 2 +- .../CustomUIControl/CustomControl.swift | 27 +++++++++++++++---- .../CustomUIControl/ViewController.swift | 9 +++---- 3 files changed, 27 insertions(+), 11 deletions(-) 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 index 19f5fa23..f6a89f00 100644 --- 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 @@ -18,7 +18,7 @@ - + diff --git a/Sprint 6/Module 2-Custom Controls/CustomUIControl/CustomUIControl/CustomControl.swift b/Sprint 6/Module 2-Custom Controls/CustomUIControl/CustomUIControl/CustomControl.swift index 3253b7ad..ee5c9f55 100644 --- a/Sprint 6/Module 2-Custom Controls/CustomUIControl/CustomUIControl/CustomControl.swift +++ b/Sprint 6/Module 2-Custom Controls/CustomUIControl/CustomUIControl/CustomControl.swift @@ -4,7 +4,6 @@ import UIKit class CustomControl: UIControl { static var starValue: Int = 1 - //let localStarValue: Int = 1 var labelArray: [UILabel] = [] private let componentDimension: CGFloat = 40.0 @@ -21,8 +20,7 @@ class CustomControl: UIControl { func setup(){ - - //var labelArray: [UILabel] = [] + var layoutX: CGFloat = 8.0 for label in 1...5 { let testLabel = UILabel(frame: CGRect(x: layoutX, y: 0, width: componentDimension, height: componentDimension)) @@ -36,6 +34,7 @@ class CustomControl: UIControl { }else { testLabel.textColor = componentInactiveColor } labelArray.append(testLabel) addSubview(testLabel) + clipsToBounds = true } } @@ -47,7 +46,25 @@ class CustomControl: UIControl { } 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 { @@ -73,8 +90,8 @@ class CustomControl: UIControl { guard let touch = touch else {return} let touchPoint = touch.location(in: self) if bounds.contains(touchPoint) { - updateValue(at: touch) sendActions(for: [.touchUpInside]) + //updateValue(at: touch) } else { diff --git a/Sprint 6/Module 2-Custom Controls/CustomUIControl/CustomUIControl/ViewController.swift b/Sprint 6/Module 2-Custom Controls/CustomUIControl/CustomUIControl/ViewController.swift index 64a0669c..8f3fbd22 100644 --- a/Sprint 6/Module 2-Custom Controls/CustomUIControl/CustomUIControl/ViewController.swift +++ b/Sprint 6/Module 2-Custom Controls/CustomUIControl/CustomUIControl/ViewController.swift @@ -9,11 +9,10 @@ class ViewController: UIViewController { @IBAction func updateRating(_ ratingControl: CustomControl) { - title = "User Rating: \(CustomControl.starValue) stars" -// switch CustomControl.starValue { -// case 1: title = "User Rating: \(CustomControl.starValue) star" -// default: title = "User Rating: \(CustomControl.starValue) stars" -// } + switch CustomControl.starValue { + case 1: title = "User Rating: \(CustomControl.starValue) star" + default: title = "User Rating: \(CustomControl.starValue) stars" + } } From 0f4b6e4ecb131231fa3b822ebd3c94e1dedcfd83 Mon Sep 17 00:00:00 2001 From: jkaunert <44586402+jkaunert@users.noreply.github.com> Date: Wed, 9 Jan 2019 01:29:40 -0600 Subject: [PATCH 04/16] implements performFlare() animation sequence. --- .../CustomUIControl/CustomUIControl/ViewController.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sprint 6/Module 2-Custom Controls/CustomUIControl/CustomUIControl/ViewController.swift b/Sprint 6/Module 2-Custom Controls/CustomUIControl/CustomUIControl/ViewController.swift index 8f3fbd22..19254909 100644 --- a/Sprint 6/Module 2-Custom Controls/CustomUIControl/CustomUIControl/ViewController.swift +++ b/Sprint 6/Module 2-Custom Controls/CustomUIControl/CustomUIControl/ViewController.swift @@ -8,7 +8,7 @@ class ViewController: UIViewController { } @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" From b4e055f7461db73b408db118b31029d5f9c707d6 Mon Sep 17 00:00:00 2001 From: jkaunert <44586402+jkaunert@users.noreply.github.com> Date: Wed, 13 Feb 2019 15:04:17 -0600 Subject: [PATCH 05/16] (feat) Implements workspace embedded with LoadingUI framework and LoadingUIDemoApp skeletons. --- .../LoadingUI.xcodeproj/project.pbxproj | 474 ++++++++++++++++++ .../LoadingUI/LoadingUI/Info.plist | 22 + .../LoadingUI/LoadingUI/LoadingUI.h | 19 + .../LoadingUI/LoadingViewController.swift | 30 ++ .../LoadingUI/LoadingViewController.xib | 22 + .../LoadingUI/LoadingUITests/Info.plist | 22 + .../LoadingUITests/LoadingUITests.swift | 34 ++ .../project.pbxproj | 341 +++++++++++++ .../LoadingUIDemoApp/AppDelegate.swift | 46 ++ .../AppIcon.appiconset/Contents.json | 98 ++++ .../Assets.xcassets/Contents.json | 6 + .../Base.lproj/LaunchScreen.storyboard | 25 + .../Base.lproj/Main.storyboard | 24 + .../LoadingUIDemoApp/Info.plist | 45 ++ .../LoadingUIDemoApp/ViewController.swift | 21 + 15 files changed, 1229 insertions(+) create mode 100644 Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUI/LoadingUI.xcodeproj/project.pbxproj create mode 100644 Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUI/LoadingUI/Info.plist create mode 100644 Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUI/LoadingUI/LoadingUI.h create mode 100644 Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUI/LoadingUI/LoadingViewController.swift create mode 100644 Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUI/LoadingUI/LoadingViewController.xib create mode 100644 Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUI/LoadingUITests/Info.plist create mode 100644 Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUI/LoadingUITests/LoadingUITests.swift create mode 100644 Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUIDemoApp/LoadingUIDemoApp.xcodeproj/project.pbxproj create mode 100644 Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUIDemoApp/LoadingUIDemoApp/AppDelegate.swift create mode 100644 Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUIDemoApp/LoadingUIDemoApp/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUIDemoApp/LoadingUIDemoApp/Assets.xcassets/Contents.json create mode 100644 Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUIDemoApp/LoadingUIDemoApp/Base.lproj/LaunchScreen.storyboard create mode 100644 Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUIDemoApp/LoadingUIDemoApp/Base.lproj/Main.storyboard create mode 100644 Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUIDemoApp/LoadingUIDemoApp/Info.plist create mode 100644 Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUIDemoApp/LoadingUIDemoApp/ViewController.swift 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..ebf6086c --- /dev/null +++ b/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUI/LoadingUI.xcodeproj/project.pbxproj @@ -0,0 +1,474 @@ +// !$*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 */; }; + AB3A0ECC2214BD0200BE8432 /* LoadingViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = AB3A0ECA2214BD0200BE8432 /* LoadingViewController.xib */; }; +/* 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 = ""; }; + AB3A0ECA2214BD0200BE8432 /* LoadingViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LoadingViewController.xib; 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 */, + AB3A0EC92214BD0200BE8432 /* LoadingViewController.swift */, + AB3A0ECA2214BD0200BE8432 /* LoadingViewController.xib */, + AB3A0E952214BA8800BE8432 /* Info.plist */, + ); + path = LoadingUI; + sourceTree = ""; + }; + AB3A0E9E2214BA8800BE8432 /* LoadingUITests */ = { + isa = PBXGroup; + children = ( + AB3A0E9F2214BA8800BE8432 /* LoadingUITests.swift */, + AB3A0EA12214BA8800BE8432 /* Info.plist */, + ); + path = LoadingUITests; + 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 = ( + AB3A0ECC2214BD0200BE8432 /* LoadingViewController.xib in Resources */, + ); + 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 */, + ); + 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/LoadingUIFrameworkDevelopment/LoadingUI/LoadingUI/LoadingViewController.swift b/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUI/LoadingUI/LoadingViewController.swift new file mode 100644 index 00000000..61098b36 --- /dev/null +++ b/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUI/LoadingUI/LoadingViewController.swift @@ -0,0 +1,30 @@ +// +// LoadingViewController.swift +// LoadingUI +// +// Created by TuneUp Shop on 2/13/19. +// Copyright © 2019 jkaunert. All rights reserved. +// + +import UIKit + +class LoadingViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + + // 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. + } + */ + +} diff --git a/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUI/LoadingUI/LoadingViewController.xib b/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUI/LoadingUI/LoadingViewController.xib new file mode 100644 index 00000000..2ea83ad7 --- /dev/null +++ b/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUI/LoadingUI/LoadingViewController.xib @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + 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..8cd8f952 --- /dev/null +++ b/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUIDemoApp/LoadingUIDemoApp.xcodeproj/project.pbxproj @@ -0,0 +1,341 @@ +// !$*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 */; }; +/* End PBXBuildFile 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 = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + AB3A0EB12214BAE100BE8432 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + AB3A0EAB2214BAE100BE8432 = { + isa = PBXGroup; + children = ( + 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 */, + ); + 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..f1bcf384 --- /dev/null +++ b/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUIDemoApp/LoadingUIDemoApp/Base.lproj/Main.storyboard @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + 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..f9645836 --- /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. + } + + +} + From c2b55432f508a6658c02a51bd3cc870d5cdf5fd9 Mon Sep 17 00:00:00 2001 From: jkaunert <44586402+jkaunert@users.noreply.github.com> Date: Wed, 13 Feb 2019 17:16:31 -0600 Subject: [PATCH 06/16] (feat) implements view controller class in framework, implements test app, MVP complete. --- .../LoadingUI.xcodeproj/project.pbxproj | 18 +++-- .../LoadingUI/LoadingViewController.swift | 30 --------- .../LoadingUI/LoadingViewController.xib | 22 ------- .../IndeterminateLoadingView.swift | 10 +-- .../LoadingViewController.swift | 50 ++++++++++++++ .../project.pbxproj | 20 ++++++ .../Base.lproj/Main.storyboard | 65 ++++++++++++++++++- .../LoadingUIDemoApp/ViewController.swift | 1 + 8 files changed, 151 insertions(+), 65 deletions(-) delete mode 100644 Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUI/LoadingUI/LoadingViewController.swift delete mode 100644 Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUI/LoadingUI/LoadingViewController.xib rename Sprint 9/Creating Frameworks/{ => LoadingUIFrameworkDevelopment/LoadingUI/LoadingUI/View Controllers}/IndeterminateLoadingView.swift (91%) create mode 100644 Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUI/LoadingUI/View Controllers/LoadingViewController.swift diff --git a/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUI/LoadingUI.xcodeproj/project.pbxproj b/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUI/LoadingUI.xcodeproj/project.pbxproj index ebf6086c..30c4f4f9 100644 --- a/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUI/LoadingUI.xcodeproj/project.pbxproj +++ b/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUI/LoadingUI.xcodeproj/project.pbxproj @@ -11,7 +11,7 @@ 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 */; }; - AB3A0ECC2214BD0200BE8432 /* LoadingViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = AB3A0ECA2214BD0200BE8432 /* LoadingViewController.xib */; }; + AB3A0ECE2214BE5700BE8432 /* IndeterminateLoadingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = AB3A0ECD2214BE5700BE8432 /* IndeterminateLoadingView.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -32,7 +32,7 @@ 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 = ""; }; - AB3A0ECA2214BD0200BE8432 /* LoadingViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LoadingViewController.xib; sourceTree = ""; }; + AB3A0ECD2214BE5700BE8432 /* IndeterminateLoadingView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IndeterminateLoadingView.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -76,8 +76,7 @@ isa = PBXGroup; children = ( AB3A0E942214BA8800BE8432 /* LoadingUI.h */, - AB3A0EC92214BD0200BE8432 /* LoadingViewController.swift */, - AB3A0ECA2214BD0200BE8432 /* LoadingViewController.xib */, + AB3A0ECF2214BEB100BE8432 /* View Controllers */, AB3A0E952214BA8800BE8432 /* Info.plist */, ); path = LoadingUI; @@ -92,6 +91,15 @@ 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 */ @@ -184,7 +192,6 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - AB3A0ECC2214BD0200BE8432 /* LoadingViewController.xib in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -203,6 +210,7 @@ buildActionMask = 2147483647; files = ( AB3A0ECB2214BD0200BE8432 /* LoadingViewController.swift in Sources */, + AB3A0ECE2214BE5700BE8432 /* IndeterminateLoadingView.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUI/LoadingUI/LoadingViewController.swift b/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUI/LoadingUI/LoadingViewController.swift deleted file mode 100644 index 61098b36..00000000 --- a/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUI/LoadingUI/LoadingViewController.swift +++ /dev/null @@ -1,30 +0,0 @@ -// -// LoadingViewController.swift -// LoadingUI -// -// Created by TuneUp Shop on 2/13/19. -// Copyright © 2019 jkaunert. All rights reserved. -// - -import UIKit - -class LoadingViewController: UIViewController { - - override func viewDidLoad() { - super.viewDidLoad() - - // 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. - } - */ - -} diff --git a/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUI/LoadingUI/LoadingViewController.xib b/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUI/LoadingUI/LoadingViewController.xib deleted file mode 100644 index 2ea83ad7..00000000 --- a/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUI/LoadingUI/LoadingViewController.xib +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - 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..59b73466 --- /dev/null +++ b/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUI/LoadingUI/View Controllers/LoadingViewController.swift @@ -0,0 +1,50 @@ +// +// LoadingViewController.swift +// LoadingUI +// +// Created by TuneUp Shop on 2/13/19. +// Copyright © 2019 jkaunert. All rights reserved. +// + +import UIKit + +open class LoadingViewController: UIViewController { + + open override func viewWillAppear(_ animated: Bool) { + super.viewWillAppear(animated) + + } + + open override func viewDidLoad() { + super.viewDidLoad() + + let loader = IndeterminateLoadingView() + let loaderParentView = UIView() + loaderParentView.frame = CGRect(x: 0.0, y: 0.0, width: 0.0, height: 0.0) + loaderParentView.center = self.view.center + loaderParentView.backgroundColor = .green + loaderParentView.addSubview(loader) + self.view.addSubview(loaderParentView) + + + loader.frame = CGRect(x: 0.0, y: 0.0, width: 0.0, height: 0.0) +// loader.center = loaderParentView.center + + print("loader: \(loader)") + loader.startAnimating() + print("View did load: \(self.view!)") + // 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. + } + */ + +} diff --git a/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUIDemoApp/LoadingUIDemoApp.xcodeproj/project.pbxproj b/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUIDemoApp/LoadingUIDemoApp.xcodeproj/project.pbxproj index 8cd8f952..d1993684 100644 --- a/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUIDemoApp/LoadingUIDemoApp.xcodeproj/project.pbxproj +++ b/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUIDemoApp/LoadingUIDemoApp.xcodeproj/project.pbxproj @@ -12,8 +12,24 @@ 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 = ""; }; @@ -22,6 +38,7 @@ 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 */ @@ -29,6 +46,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + AB3A0ED12214C6AB00BE8432 /* LoadingUI.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -38,6 +56,7 @@ AB3A0EAB2214BAE100BE8432 = { isa = PBXGroup; children = ( + AB3A0ED02214C6AB00BE8432 /* LoadingUI.framework */, AB3A0EB62214BAE100BE8432 /* LoadingUIDemoApp */, AB3A0EB52214BAE100BE8432 /* Products */, ); @@ -74,6 +93,7 @@ AB3A0EB02214BAE100BE8432 /* Sources */, AB3A0EB12214BAE100BE8432 /* Frameworks */, AB3A0EB22214BAE100BE8432 /* Resources */, + AB3A0ED32214C6AB00BE8432 /* Embed Frameworks */, ); buildRules = ( ); 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 index f1bcf384..330a95e7 100644 --- a/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUIDemoApp/LoadingUIDemoApp/Base.lproj/Main.storyboard +++ b/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUIDemoApp/LoadingUIDemoApp/Base.lproj/Main.storyboard @@ -1,7 +1,11 @@ - + + + + - + + @@ -9,16 +13,71 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUIDemoApp/LoadingUIDemoApp/ViewController.swift b/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUIDemoApp/LoadingUIDemoApp/ViewController.swift index f9645836..1b86314f 100644 --- a/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUIDemoApp/LoadingUIDemoApp/ViewController.swift +++ b/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUIDemoApp/LoadingUIDemoApp/ViewController.swift @@ -9,6 +9,7 @@ import UIKit import LoadingUI + class ViewController: UIViewController { override func viewDidLoad() { From 7384be939b547a6f32ea8d15de78150bdb1436f9 Mon Sep 17 00:00:00 2001 From: jkaunert <44586402+jkaunert@users.noreply.github.com> Date: Wed, 13 Feb 2019 19:19:22 -0600 Subject: [PATCH 07/16] (feat) implements dismissModal() function. --- .../IndeterminateLoadingView.swift | 2 +- .../LoadingViewController.swift | 23 +++++++++++-------- .../Base.lproj/Main.storyboard | 14 +++++++++++ .../LoadingUIDemoApp/ViewController.swift | 3 +-- 4 files changed, 30 insertions(+), 12 deletions(-) diff --git a/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUI/LoadingUI/View Controllers/IndeterminateLoadingView.swift b/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUI/LoadingUI/View Controllers/IndeterminateLoadingView.swift index e22f132f..fbe58427 100644 --- a/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUI/LoadingUI/View Controllers/IndeterminateLoadingView.swift +++ b/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUI/LoadingUI/View Controllers/IndeterminateLoadingView.swift @@ -49,7 +49,7 @@ internal class IndeterminateLoadingView: UIView, CAAnimationDelegate { layer.addSublayer(shapeLayer) let radius = min(bounds.width, bounds.height) / 2.0 - thickness/2.0 - let rect = CGRect(x: bounds.midX - radius/2.0, y: bounds.midY - radius/2.0, width: radius, height: radius) + let rect = CGRect(x: bounds.midX - radius/2.0, y: bounds.midY - radius/2.0, width: radius*10, height: radius*10) let path = UIBezierPath(ovalIn: rect) shapeLayer.path = path.cgPath 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 index 59b73466..51547d62 100644 --- a/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUI/LoadingUI/View Controllers/LoadingViewController.swift +++ b/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUI/LoadingUI/View Controllers/LoadingViewController.swift @@ -19,20 +19,20 @@ open class LoadingViewController: UIViewController { super.viewDidLoad() let loader = IndeterminateLoadingView() - let loaderParentView = UIView() - loaderParentView.frame = CGRect(x: 0.0, y: 0.0, width: 0.0, height: 0.0) - loaderParentView.center = self.view.center - loaderParentView.backgroundColor = .green - loaderParentView.addSubview(loader) - self.view.addSubview(loaderParentView) - +// let loaderParentView = UIView() +// loaderParentView.frame = CGRect(x: 0.0, y: 0.0, width: 0.0, height: 0.0) +// loaderParentView.center = view.center +// loaderParentView.backgroundColor = .green +// loaderParentView.addSubview(loader) +// view.addSubview(loaderParentView) + self.view.addSubview(loader) loader.frame = CGRect(x: 0.0, y: 0.0, width: 0.0, height: 0.0) -// loader.center = loaderParentView.center + loader.center = self.view.center print("loader: \(loader)") loader.startAnimating() - print("View did load: \(self.view!)") + print("View did load: \(view!)") // Do any additional setup after loading the view. } @@ -46,5 +46,10 @@ open class LoadingViewController: UIViewController { // 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/LoadingUIDemoApp/LoadingUIDemoApp/Base.lproj/Main.storyboard b/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUIDemoApp/LoadingUIDemoApp/Base.lproj/Main.storyboard index 330a95e7..63649eef 100644 --- a/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUIDemoApp/LoadingUIDemoApp/Base.lproj/Main.storyboard +++ b/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUIDemoApp/LoadingUIDemoApp/Base.lproj/Main.storyboard @@ -53,7 +53,21 @@ + + + + + + + + diff --git a/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUIDemoApp/LoadingUIDemoApp/ViewController.swift b/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUIDemoApp/LoadingUIDemoApp/ViewController.swift index 1b86314f..c0225d75 100644 --- a/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUIDemoApp/LoadingUIDemoApp/ViewController.swift +++ b/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUIDemoApp/LoadingUIDemoApp/ViewController.swift @@ -16,7 +16,6 @@ class ViewController: UIViewController { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib. } - - + } From a20e0ae6e6d71994ed2b90845d1d097e0852bd31 Mon Sep 17 00:00:00 2001 From: jkaunert <44586402+jkaunert@users.noreply.github.com> Date: Thu, 14 Feb 2019 17:52:12 -0600 Subject: [PATCH 08/16] (nit) implements trivial UI layout tweaks. --- .../IndeterminateLoadingView.swift | 2 +- .../LoadingViewController.swift | 24 +++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUI/LoadingUI/View Controllers/IndeterminateLoadingView.swift b/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUI/LoadingUI/View Controllers/IndeterminateLoadingView.swift index fbe58427..e22f132f 100644 --- a/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUI/LoadingUI/View Controllers/IndeterminateLoadingView.swift +++ b/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUI/LoadingUI/View Controllers/IndeterminateLoadingView.swift @@ -49,7 +49,7 @@ internal class IndeterminateLoadingView: UIView, CAAnimationDelegate { layer.addSublayer(shapeLayer) let radius = min(bounds.width, bounds.height) / 2.0 - thickness/2.0 - let rect = CGRect(x: bounds.midX - radius/2.0, y: bounds.midY - radius/2.0, width: radius*10, height: radius*10) + let rect = CGRect(x: bounds.midX - radius/2.0, y: bounds.midY - radius/2.0, width: radius, height: radius) let path = UIBezierPath(ovalIn: rect) shapeLayer.path = path.cgPath 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 index 51547d62..a3ff1aa4 100644 --- a/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUI/LoadingUI/View Controllers/LoadingViewController.swift +++ b/Sprint 9/Creating Frameworks/LoadingUIFrameworkDevelopment/LoadingUI/LoadingUI/View Controllers/LoadingViewController.swift @@ -10,29 +10,29 @@ import UIKit open class LoadingViewController: UIViewController { - open override func viewWillAppear(_ animated: Bool) { + let IMAGE_SIZE: CGFloat = 100 + let OFFSET: CGFloat = 0 + + override open func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) } - open override func viewDidLoad() { + override open func viewDidLoad() { super.viewDidLoad() - let loader = IndeterminateLoadingView() -// let loaderParentView = UIView() -// loaderParentView.frame = CGRect(x: 0.0, y: 0.0, width: 0.0, height: 0.0) -// loaderParentView.center = view.center -// loaderParentView.backgroundColor = .green -// loaderParentView.addSubview(loader) -// view.addSubview(loaderParentView) + let loader = IndeterminateLoadingView(frame: CGRect(x: 0.0, y: 0.0, width: 100.0, height: 100.0)) self.view.addSubview(loader) - loader.frame = CGRect(x: 0.0, y: 0.0, width: 0.0, height: 0.0) + //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 - print("loader: \(loader)") loader.startAnimating() - print("View did load: \(view!)") // Do any additional setup after loading the view. } From 54c937c3fa9c2695acd852cec65e980d2a347aba Mon Sep 17 00:00:00 2001 From: jkaunert <44586402+jkaunert@users.noreply.github.com> Date: Thu, 28 Feb 2019 16:06:45 -0600 Subject: [PATCH 09/16] (feat) Implements CalculatorViewController class files and storyboard layout. Initial Commit. --- .../project.pbxproj | 350 ++++++++++++++++++ .../RPNCalculator-ObjC/AppDelegate.h | 17 + .../RPNCalculator-ObjC/AppDelegate.m | 51 +++ .../AppIcon.appiconset/Contents.json | 98 +++++ .../Assets.xcassets/Contents.json | 6 + .../Base.lproj/LaunchScreen.storyboard | 25 ++ .../Base.lproj/Main.storyboard | 146 ++++++++ .../RPNCalculator-ObjC/Info.plist | 45 +++ .../CalculatorViewController.h | 17 + .../CalculatorViewController.m | 32 ++ .../RPNCalculator-ObjC/main.m | 16 + 11 files changed, 803 insertions(+) create mode 100644 Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC.xcodeproj/project.pbxproj create mode 100644 Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC/AppDelegate.h create mode 100644 Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC/AppDelegate.m create mode 100644 Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC/Assets.xcassets/Contents.json create mode 100644 Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC/Base.lproj/LaunchScreen.storyboard create mode 100644 Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC/Base.lproj/Main.storyboard create mode 100644 Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC/Info.plist create mode 100644 Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC/View Controller/CalculatorViewController.h create mode 100644 Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC/View Controller/CalculatorViewController.m create mode 100644 Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC/main.m 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..91008c0f --- /dev/null +++ b/Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC.xcodeproj/project.pbxproj @@ -0,0 +1,350 @@ +// !$*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 */; }; +/* 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 = ""; }; +/* 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 */, + 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 = ""; + }; +/* 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 = ( + AB59BD4E22288F7700190925 /* main.m in Sources */, + AB59BD4022288F7600190925 /* AppDelegate.m in Sources */, + AB59BD562228924B00190925 /* CalculatorViewController.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/View Controller/CalculatorViewController.h b/Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC/View Controller/CalculatorViewController.h new file mode 100644 index 00000000..055591cb --- /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 + +NS_ASSUME_NONNULL_BEGIN + +@interface CalculatorViewController : UIViewController + +@end + +NS_ASSUME_NONNULL_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])); + } +} From badc955a895c215b33d5c5f4bfc1cc55e7343df7 Mon Sep 17 00:00:00 2001 From: jkaunert <44586402+jkaunert@users.noreply.github.com> Date: Thu, 28 Feb 2019 16:18:33 -0600 Subject: [PATCH 10/16] (feat) Implements project skeleton, adds Models and Model Controller. --- .../project.pbxproj | 50 +++++++++++++++++++ .../Model Controller/JKCalculator.h | 17 +++++++ .../Model Controller/JKCalculator.m | 13 +++++ .../JKDigitAccumulator/JKDigitAccumulator.h | 17 +++++++ .../JKDigitAccumulator/JKDigitAccumulator.m | 13 +++++ .../Models/JKStack/JKStack.h | 17 +++++++ .../Models/JKStack/JKStack.m | 13 +++++ 7 files changed, 140 insertions(+) create mode 100644 Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC/Model Controller/JKCalculator.h create mode 100644 Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC/Model Controller/JKCalculator.m create mode 100644 Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC/Models/JKDigitAccumulator/JKDigitAccumulator.h create mode 100644 Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC/Models/JKDigitAccumulator/JKDigitAccumulator.m create mode 100644 Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC/Models/JKStack/JKStack.h create mode 100644 Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC/Models/JKStack/JKStack.m 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 index 91008c0f..152fe0e2 100644 --- a/Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC.xcodeproj/project.pbxproj +++ b/Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC.xcodeproj/project.pbxproj @@ -13,6 +13,9 @@ 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 */ @@ -26,6 +29,12 @@ 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 */ @@ -60,6 +69,8 @@ children = ( AB59BD3E22288F7600190925 /* AppDelegate.h */, AB59BD3F22288F7600190925 /* AppDelegate.m */, + AB59BD5F2228943C00190925 /* Model Controller */, + AB59BD5B222893FC00190925 /* Models */, AB59BD572228925000190925 /* View Controller */, AB59BD4422288F7600190925 /* Main.storyboard */, AB59BD4722288F7700190925 /* Assets.xcassets */, @@ -79,6 +90,42 @@ 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 */ @@ -149,9 +196,12 @@ 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; }; 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..a29834f4 --- /dev/null +++ b/Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC/Model Controller/JKCalculator.h @@ -0,0 +1,17 @@ +// +// JKCalculator.h +// RPNCalculator-ObjC +// +// Created by TuneUp Shop on 2/28/19. +// Copyright © 2019 jkaunert. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface JKCalculator : NSObject + +@end + +NS_ASSUME_NONNULL_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..59005bf0 --- /dev/null +++ b/Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC/Model Controller/JKCalculator.m @@ -0,0 +1,13 @@ +// +// JKCalculator.m +// RPNCalculator-ObjC +// +// Created by TuneUp Shop on 2/28/19. +// Copyright © 2019 jkaunert. All rights reserved. +// + +#import "JKCalculator.h" + +@implementation JKCalculator + +@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..f078e73f --- /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 + +NS_ASSUME_NONNULL_BEGIN + +@interface JKDigitAccumulator : NSObject + +@end + +NS_ASSUME_NONNULL_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..60c5081c --- /dev/null +++ b/Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC/Models/JKStack/JKStack.h @@ -0,0 +1,17 @@ +// +// JKStack.h +// RPNCalculator-ObjC +// +// Created by TuneUp Shop on 2/28/19. +// Copyright © 2019 jkaunert. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface JKStack : NSObject + +@end + +NS_ASSUME_NONNULL_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..83dcb2ef --- /dev/null +++ b/Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC/Models/JKStack/JKStack.m @@ -0,0 +1,13 @@ +// +// JKStack.m +// RPNCalculator-ObjC +// +// Created by TuneUp Shop on 2/28/19. +// Copyright © 2019 jkaunert. All rights reserved. +// + +#import "JKStack.h" + +@implementation JKStack + +@end From 5acf6b0d14841ae677b196cab06b56a69eddee10 Mon Sep 17 00:00:00 2001 From: jkaunert <44586402+jkaunert@users.noreply.github.com> Date: Thu, 28 Feb 2019 23:23:38 -0600 Subject: [PATCH 11/16] (feat) implements model controller JKCalculator and emplty JKDigitAccumulator class. --- .../Model Controller/JKCalculator.h | 21 ++++++++++- .../Model Controller/JKCalculator.m | 26 +++++++++++++ .../JKDigitAccumulator/JKDigitAccumulator.h | 4 +- .../Models/JKStack/JKStack.h | 12 +++++- .../Models/JKStack/JKStack.m | 37 +++++++++++++++++++ .../CalculatorViewController.h | 4 +- 6 files changed, 96 insertions(+), 8 deletions(-) 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 index a29834f4..d998fbce 100644 --- 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 @@ -7,11 +7,28 @@ // #import +#import "JKStack.h" +#import "JKDigitAccumulator.h" -NS_ASSUME_NONNULL_BEGIN + + +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 -NS_ASSUME_NONNULL_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 index 59005bf0..6168f33e 100644 --- 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 @@ -7,7 +7,33 @@ // #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)applyOperator:(RPNOperator)operator { + +} + +- (void)clear { + +} + +- (id)getTopValue { + return [_stack peekValue]; +} + @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 index f078e73f..e2864962 100644 --- 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 @@ -8,10 +8,10 @@ #import -NS_ASSUME_NONNULL_BEGIN + @interface JKDigitAccumulator : NSObject @end -NS_ASSUME_NONNULL_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 index 60c5081c..2cfccff2 100644 --- 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 @@ -8,10 +8,18 @@ #import -NS_ASSUME_NONNULL_BEGIN + @interface JKStack : NSObject +- (instancetype)initWithArray:(NSArray *)array; + +- (void)pushValue:(id)value; + +- (instancetype)popValue; + +- (instancetype)peekValue; + @end -NS_ASSUME_NONNULL_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 index 83dcb2ef..72952808 100644 --- 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 @@ -8,6 +8,43 @@ #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; +} + @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 index 055591cb..a4be03fb 100644 --- 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 @@ -8,10 +8,10 @@ #import -NS_ASSUME_NONNULL_BEGIN + @interface CalculatorViewController : UIViewController @end -NS_ASSUME_NONNULL_END + From 51b21cbbda35dd8c461b0360ad0fdc6d8fce5660 Mon Sep 17 00:00:00 2001 From: jkaunert <44586402+jkaunert@users.noreply.github.com> Date: Fri, 1 Mar 2019 10:07:23 -0600 Subject: [PATCH 12/16] (feat) Implements JKStack fully. --- .../Model Controller/JKCalculator.m | 30 +++++++++++++++---- .../Models/JKStack/JKStack.h | 2 ++ .../Models/JKStack/JKStack.m | 6 ++++ 3 files changed, 33 insertions(+), 5 deletions(-) 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 index 6168f33e..d7c23a1a 100644 --- 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 @@ -24,16 +24,36 @@ - (void)pushNumber:(id)value { [_stack pushValue:value]; } -- (void)applyOperator:(RPNOperator)operator { - -} - - (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/JKStack/JKStack.h b/Sprint 11/Module 4/RPNCalculator-ObjC/RPNCalculator-ObjC/Models/JKStack/JKStack.h index 2cfccff2..2244ffb3 100644 --- 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 @@ -18,6 +18,8 @@ - (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 index 72952808..2bb18173 100644 --- 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 @@ -47,4 +47,10 @@ - (instancetype)peekValue { return nil; } +- (void)emptyStack { + if (_values.count > 0) { + [_values removeAllObjects]; + } +} + @end From f1e7a6214abd57c9001cec042b044cc2f8db6620 Mon Sep 17 00:00:00 2001 From: jkaunert <44586402+jkaunert@users.noreply.github.com> Date: Mon, 4 Mar 2019 13:09:39 -0600 Subject: [PATCH 13/16] Initial Commit. --- .../Astronomy-ObjC.xcodeproj/project.pbxproj | 342 ++++++++++++++++++ .../Astronomy-ObjC/AppDelegate.h | 17 + .../Astronomy-ObjC/AppDelegate.m | 51 +++ .../AppIcon.appiconset/Contents.json | 98 +++++ .../Assets.xcassets/Contents.json | 6 + .../Base.lproj/LaunchScreen.storyboard | 25 ++ .../Astronomy-ObjC/Base.lproj/Main.storyboard | 24 ++ .../Astronomy-ObjC/Astronomy-ObjC/Info.plist | 45 +++ .../Astronomy-ObjC/ViewController.h | 15 + .../Astronomy-ObjC/ViewController.m | 23 ++ .../Astronomy-ObjC/Astronomy-ObjC/main.m | 16 + 11 files changed, 662 insertions(+) create mode 100644 Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC.xcodeproj/project.pbxproj create mode 100644 Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/AppDelegate.h create mode 100644 Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/AppDelegate.m create mode 100644 Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Assets.xcassets/Contents.json create mode 100644 Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Base.lproj/LaunchScreen.storyboard create mode 100644 Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Base.lproj/Main.storyboard create mode 100644 Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Info.plist create mode 100644 Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/ViewController.h create mode 100644 Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/ViewController.m create mode 100644 Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/main.m 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..652bda9f --- /dev/null +++ b/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC.xcodeproj/project.pbxproj @@ -0,0 +1,342 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXBuildFile section */ + AB59BE2C222DAEB200190925 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = AB59BE2B222DAEB200190925 /* AppDelegate.m */; }; + AB59BE2F222DAEB200190925 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = AB59BE2E222DAEB200190925 /* ViewController.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 */; }; +/* 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 = ""; }; + AB59BE2D222DAEB200190925 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; + AB59BE2E222DAEB200190925 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.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 = ""; }; +/* 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 */, + AB59BE2D222DAEB200190925 /* ViewController.h */, + AB59BE2E222DAEB200190925 /* ViewController.m */, + AB59BE30222DAEB200190925 /* Main.storyboard */, + AB59BE33222DAEB400190925 /* Assets.xcassets */, + AB59BE35222DAEB400190925 /* LaunchScreen.storyboard */, + AB59BE38222DAEB400190925 /* Info.plist */, + AB59BE39222DAEB400190925 /* main.m */, + ); + path = "Astronomy-ObjC"; + 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; + }; + }; + }; + 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 = ( + AB59BE2F222DAEB200190925 /* ViewController.m in Sources */, + AB59BE3A222DAEB400190925 /* main.m in Sources */, + AB59BE2C222DAEB200190925 /* AppDelegate.m 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; + CODE_SIGN_STYLE = Automatic; + 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)"; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + AB59BE3F222DAEB400190925 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + 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)"; + 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/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..942f0bc4 --- /dev/null +++ b/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Base.lproj/Main.storyboard @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + 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/ViewController.h b/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/ViewController.h new file mode 100644 index 00000000..99ffeed7 --- /dev/null +++ b/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/ViewController.h @@ -0,0 +1,15 @@ +// +// ViewController.h +// Astronomy-ObjC +// +// Created by TuneUp Shop on 3/4/19. +// Copyright © 2019 jkaunert. All rights reserved. +// + +#import + +@interface ViewController : UIViewController + + +@end + diff --git a/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/ViewController.m b/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/ViewController.m new file mode 100644 index 00000000..08ccf4eb --- /dev/null +++ b/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/ViewController.m @@ -0,0 +1,23 @@ +// +// ViewController.m +// Astronomy-ObjC +// +// Created by TuneUp Shop on 3/4/19. +// Copyright © 2019 jkaunert. All rights reserved. +// + +#import "ViewController.h" + +@interface ViewController () + +@end + +@implementation ViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + // Do any additional setup after loading the view, typically from a nib. +} + + +@end 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])); + } +} From 25da623db5faa30efb7bbd3956ec15438410dc9e Mon Sep 17 00:00:00 2001 From: jkaunert <44586402+jkaunert@users.noreply.github.com> Date: Mon, 11 Mar 2019 18:09:23 -0500 Subject: [PATCH 14/16] adds class skeletons. --- .../ContactsMRC.xcodeproj/project.pbxproj | 342 ++++++++++++++++++ .../ContactsMRC/ContactsMRC/AppDelegate.h | 17 + .../ContactsMRC/ContactsMRC/AppDelegate.m | 51 +++ .../AppIcon.appiconset/Contents.json | 98 +++++ .../ContactsMRC/Assets.xcassets/Contents.json | 6 + .../Base.lproj/LaunchScreen.storyboard | 25 ++ .../ContactsMRC/Base.lproj/Main.storyboard | 24 ++ .../ContactsMRC/ContactsMRC/Info.plist | 45 +++ .../Model Controller/JKContactsController.h | 17 + .../Model Controller/JKContactsController.m | 13 + .../ContactsMRC/ContactsMRC/Model/JKContact.h | 17 + .../ContactsMRC/ContactsMRC/Model/JKContact.m | 13 + .../JKContactDetailViewController.h | 17 + .../JKContactDetailViewController.m | 32 ++ .../JKContactsTableViewController.h | 17 + .../JKContactsTableViewController.m | 93 +++++ .../Module 4/ContactsMRC/ContactsMRC/main.m | 16 + .../Astronomy-ObjC.xcodeproj/project.pbxproj | 143 +++++++- .../MarsPlaceholder.imageset/Contents.json | 12 + .../MarsPlaceholder.jpg | Bin 0 -> 24263 bytes .../Astronomy-ObjC/Base.lproj/Main.storyboard | 175 ++++++++- .../Astronomy-ObjC-Bridging-Header.h | 9 + .../Models/Camera.swift/Camera.swift | 24 ++ .../JKMarsPhotoReference.h | 33 ++ .../JKMarsPhotoReference.m | 26 ++ .../Models/JKMarsRover/JKMarsRover.h | 17 + .../JKMarsRover/JKMarsRover.m} | 8 +- .../JKSolDescription/JKSolDescription.h | 19 + .../JKSolDescription/JKSolDescription.m | 13 + .../Astronomy-ObjC/Models/New Group/JKCache.h | 17 + .../Astronomy-ObjC/Models/New Group/JKCache.m | 13 + .../Networking/JKMarsRoverClient.h | 17 + .../Networking/JKMarsRoverClient.m | 13 + .../NSURLSession+JKNetworkDataLoader.h | 17 + .../NSURLSession+JKNetworkDataLoader.m | 13 + .../PhotoDetailViewController.swift | 79 ++++ .../PhotosCollectionViewController.swift | 209 +++++++++++ .../Astronomy-ObjC/ViewController.m | 23 -- .../Views/ImageCollectionViewCell.swift | 23 ++ 39 files changed, 1704 insertions(+), 42 deletions(-) create mode 100644 Sprint 12/Module 4/ContactsMRC/ContactsMRC.xcodeproj/project.pbxproj create mode 100644 Sprint 12/Module 4/ContactsMRC/ContactsMRC/AppDelegate.h create mode 100644 Sprint 12/Module 4/ContactsMRC/ContactsMRC/AppDelegate.m create mode 100644 Sprint 12/Module 4/ContactsMRC/ContactsMRC/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 Sprint 12/Module 4/ContactsMRC/ContactsMRC/Assets.xcassets/Contents.json create mode 100644 Sprint 12/Module 4/ContactsMRC/ContactsMRC/Base.lproj/LaunchScreen.storyboard create mode 100644 Sprint 12/Module 4/ContactsMRC/ContactsMRC/Base.lproj/Main.storyboard create mode 100644 Sprint 12/Module 4/ContactsMRC/ContactsMRC/Info.plist create mode 100644 Sprint 12/Module 4/ContactsMRC/ContactsMRC/Model Controller/JKContactsController.h create mode 100644 Sprint 12/Module 4/ContactsMRC/ContactsMRC/Model Controller/JKContactsController.m create mode 100644 Sprint 12/Module 4/ContactsMRC/ContactsMRC/Model/JKContact.h create mode 100644 Sprint 12/Module 4/ContactsMRC/ContactsMRC/Model/JKContact.m create mode 100644 Sprint 12/Module 4/ContactsMRC/ContactsMRC/View Controllers/JKContactDetailViewController.h create mode 100644 Sprint 12/Module 4/ContactsMRC/ContactsMRC/View Controllers/JKContactDetailViewController.m create mode 100644 Sprint 12/Module 4/ContactsMRC/ContactsMRC/View Controllers/JKContactsTableViewController.h create mode 100644 Sprint 12/Module 4/ContactsMRC/ContactsMRC/View Controllers/JKContactsTableViewController.m create mode 100644 Sprint 12/Module 4/ContactsMRC/ContactsMRC/main.m create mode 100644 Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Assets.xcassets/MarsPlaceholder.imageset/Contents.json create mode 100644 Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Assets.xcassets/MarsPlaceholder.imageset/MarsPlaceholder.jpg create mode 100644 Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Models/Camera.swift/Astronomy-ObjC-Bridging-Header.h create mode 100644 Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Models/Camera.swift/Camera.swift create mode 100644 Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Models/JKMarsPhotoReference/JKMarsPhotoReference.h create mode 100644 Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Models/JKMarsPhotoReference/JKMarsPhotoReference.m create mode 100644 Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Models/JKMarsRover/JKMarsRover.h rename Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/{ViewController.h => Models/JKMarsRover/JKMarsRover.m} (58%) create mode 100644 Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Models/JKSolDescription/JKSolDescription.h create mode 100644 Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Models/JKSolDescription/JKSolDescription.m create mode 100644 Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Models/New Group/JKCache.h create mode 100644 Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Models/New Group/JKCache.m create mode 100644 Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Networking/JKMarsRoverClient.h create mode 100644 Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Networking/JKMarsRoverClient.m create mode 100644 Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Networking/NSURLSession+JKNetworkDataLoader.h create mode 100644 Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Networking/NSURLSession+JKNetworkDataLoader.m create mode 100644 Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/View Controllers/PhotoDetailViewController.swift create mode 100644 Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/View Controllers/PhotosCollectionViewController.swift delete mode 100644 Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/ViewController.m create mode 100644 Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Views/ImageCollectionViewCell.swift 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..655b3e73 --- /dev/null +++ b/Sprint 12/Module 4/ContactsMRC/ContactsMRC.xcodeproj/project.pbxproj @@ -0,0 +1,342 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXBuildFile section */ + AB59BEB7223093C500190925 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = AB59BEB6223093C500190925 /* AppDelegate.m */; }; + AB59BEBA223093C500190925 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = AB59BEB9223093C500190925 /* ViewController.m */; }; + 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 */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + AB59BEB2223093C500190925 /* ContactsMRC.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ContactsMRC.app; sourceTree = BUILT_PRODUCTS_DIR; }; + AB59BEB5223093C500190925 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + AB59BEB6223093C500190925 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + AB59BEB8223093C500190925 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; + AB59BEB9223093C500190925 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; + 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 = ""; }; +/* 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 = ( + AB59BEB5223093C500190925 /* AppDelegate.h */, + AB59BEB6223093C500190925 /* AppDelegate.m */, + AB59BEB8223093C500190925 /* ViewController.h */, + AB59BEB9223093C500190925 /* ViewController.m */, + AB59BEBB223093C500190925 /* Main.storyboard */, + AB59BEBE223093C600190925 /* Assets.xcassets */, + AB59BEC0223093C600190925 /* LaunchScreen.storyboard */, + AB59BEC3223093C600190925 /* Info.plist */, + AB59BEC4223093C600190925 /* main.m */, + ); + path = ContactsMRC; + 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 = ( + AB59BEBA223093C500190925 /* ViewController.m in Sources */, + AB59BEC5223093C600190925 /* main.m in Sources */, + AB59BEB7223093C500190925 /* 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 = 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; + }; + 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 = 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; + }; + 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/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..942f0bc4 --- /dev/null +++ b/Sprint 12/Module 4/ContactsMRC/ContactsMRC/Base.lproj/Main.storyboard @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + 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..e295193f --- /dev/null +++ b/Sprint 12/Module 4/ContactsMRC/ContactsMRC/Model Controller/JKContactsController.h @@ -0,0 +1,17 @@ +// +// JKContactsController.h +// ContactsMRC +// +// Created by TuneUp Shop on 3/7/19. +// Copyright © 2019 jkaunert. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface JKContactsController : NSObject + +@end + +NS_ASSUME_NONNULL_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..8e4191d2 --- /dev/null +++ b/Sprint 12/Module 4/ContactsMRC/ContactsMRC/Model Controller/JKContactsController.m @@ -0,0 +1,13 @@ +// +// JKContactsController.m +// ContactsMRC +// +// Created by TuneUp Shop on 3/7/19. +// Copyright © 2019 jkaunert. All rights reserved. +// + +#import "JKContactsController.h" + +@implementation JKContactsController + +@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..fa713485 --- /dev/null +++ b/Sprint 12/Module 4/ContactsMRC/ContactsMRC/Model/JKContact.h @@ -0,0 +1,17 @@ +// +// 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 + +@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..20f0331f --- /dev/null +++ b/Sprint 12/Module 4/ContactsMRC/ContactsMRC/Model/JKContact.m @@ -0,0 +1,13 @@ +// +// JKContact.m +// ContactsMRC +// +// Created by TuneUp Shop on 3/7/19. +// Copyright © 2019 jkaunert. All rights reserved. +// + +#import "JKContact.h" + +@implementation JKContact + +@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..43316668 --- /dev/null +++ b/Sprint 12/Module 4/ContactsMRC/ContactsMRC/View Controllers/JKContactDetailViewController.h @@ -0,0 +1,17 @@ +// +// JKContactDetailViewController.h +// ContactsMRC +// +// Created by TuneUp Shop on 3/7/19. +// Copyright © 2019 jkaunert. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface JKContactDetailViewController : UIViewController + +@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..1629ce10 --- /dev/null +++ b/Sprint 12/Module 4/ContactsMRC/ContactsMRC/View Controllers/JKContactDetailViewController.m @@ -0,0 +1,32 @@ +// +// JKContactDetailViewController.m +// ContactsMRC +// +// Created by TuneUp Shop on 3/7/19. +// Copyright © 2019 jkaunert. All rights reserved. +// + +#import "JKContactDetailViewController.h" + +@interface JKContactDetailViewController () + +@end + +@implementation JKContactDetailViewController + +- (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 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..92024298 --- /dev/null +++ b/Sprint 12/Module 4/ContactsMRC/ContactsMRC/View Controllers/JKContactsTableViewController.h @@ -0,0 +1,17 @@ +// +// JKContactsTableViewController.h +// ContactsMRC +// +// Created by TuneUp Shop on 3/7/19. +// Copyright © 2019 jkaunert. All rights reserved. +// + +#import + +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..64d0c45e --- /dev/null +++ b/Sprint 12/Module 4/ContactsMRC/ContactsMRC/View Controllers/JKContactsTableViewController.m @@ -0,0 +1,93 @@ +// +// JKContactsTableViewController.m +// ContactsMRC +// +// Created by TuneUp Shop on 3/7/19. +// Copyright © 2019 jkaunert. All rights reserved. +// + +#import "JKContactsTableViewController.h" + +@interface JKContactsTableViewController () + +@end + +@implementation JKContactsTableViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + + // Uncomment the following line to preserve selection between presentations. + // self.clearsSelectionOnViewWillAppear = NO; + + // Uncomment the following line to display an Edit button in the navigation bar for this view controller. + // self.navigationItem.rightBarButtonItem = self.editButtonItem; +} + +#pragma mark - Table view data source + +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { +#warning Incomplete implementation, return the number of sections + return 0; +} + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { +#warning Incomplete implementation, return the number of rows + return 0; +} + +/* +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:<#@"reuseIdentifier"#> forIndexPath:indexPath]; + + // Configure the cell... + + return cell; +} +*/ + +/* +// Override to support conditional editing of the table view. +- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath { + // Return NO if you do not want the specified item to be editable. + return YES; +} +*/ + +/* +// Override to support editing the table view. +- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath { + if (editingStyle == UITableViewCellEditingStyleDelete) { + // Delete the row from the data source + [tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade]; + } else if (editingStyle == UITableViewCellEditingStyleInsert) { + // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view + } +} +*/ + +/* +// Override to support rearranging the table view. +- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath { +} +*/ + +/* +// Override to support conditional rearranging of the table view. +- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath { + // Return NO if you do not want the item to be re-orderable. + return YES; +} +*/ + +/* +#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 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 index 652bda9f..c195ce8c 100644 --- 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 @@ -8,24 +8,48 @@ /* Begin PBXBuildFile section */ AB59BE2C222DAEB200190925 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = AB59BE2B222DAEB200190925 /* AppDelegate.m */; }; - AB59BE2F222DAEB200190925 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = AB59BE2E222DAEB200190925 /* ViewController.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 = ""; }; - AB59BE2D222DAEB200190925 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; - AB59BE2E222DAEB200190925 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.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 */ @@ -60,8 +84,10 @@ children = ( AB59BE2A222DAEB200190925 /* AppDelegate.h */, AB59BE2B222DAEB200190925 /* AppDelegate.m */, - AB59BE2D222DAEB200190925 /* ViewController.h */, - AB59BE2E222DAEB200190925 /* ViewController.m */, + AB7D91E322371E0C00A8FEF8 /* Networking */, + AB59BE56222DE89A00190925 /* View Controllers */, + AB59BE55222DE88E00190925 /* Views */, + AB59BE48222DE0A500190925 /* Models */, AB59BE30222DAEB200190925 /* Main.storyboard */, AB59BE33222DAEB400190925 /* Assets.xcassets */, AB59BE35222DAEB400190925 /* LaunchScreen.storyboard */, @@ -71,6 +97,92 @@ 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 */ @@ -102,6 +214,7 @@ TargetAttributes = { AB59BE26222DAEB200190925 = { CreatedOnToolsVersion = 10.1; + LastSwiftMigration = 1010; }; }; }; @@ -141,9 +254,18 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - AB59BE2F222DAEB200190925 /* ViewController.m in Sources */, + 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; }; @@ -285,7 +407,9 @@ 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 = ( @@ -294,6 +418,9 @@ ); 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; @@ -302,7 +429,9 @@ 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 = ( @@ -311,6 +440,8 @@ ); 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; 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 0000000000000000000000000000000000000000..a43b5801ba995cd50529360948f078b24cfe4d66 GIT binary patch literal 24263 zcmbTe2|QHczd!z*S&V&b$uia-o^>wSRF($vBfAP4~F z@C&Se2aMh4JzN3Uw+|=*0N4Q$5de62gupL=hymh1jsdVl#Q%AG5K;Wsb8rA$@&JT? zJ;xTl|9!zL|NZp8zT+|E->-<_{_Sj}8pHql@!yZFj{_~byLW)Mzq_}OwE8v`pk-{a zkMQ^E@b!;l`F|YpwMj6(CW2>#5tQS`uSMgC^-93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xAK^Ua}2ekcGOWXIUO7F=2u+koe{j}2qC^dTC|vju8}lkd7wYFuc7#%$m7(8Dq;*c?e)&2-&gbf)pD6912<@^;gT>;Vf4 z_b7p+g0Ud2*Rw}mqxB4MUE~d4a!@l{){-iO23?HBhCDNV$M<(QJC{KTRZ)@j+5bI- zq2le3`Z}J&a7nBqt)IlZ7Gm~!pR+K-rzmOyW+h$iWXW zF^^g61v;ZY4wqOpfU~yIoc&LD>-cn*e@$TTjq1X&eBFJ{<7=u zWCel8kZI^EH|m&@aJb(h0JNmwS`B$dxp8Q7>;>s#e~J@Wh@qY+Bd^VET2W#y*t~Ad zocTm&V-PyK)Y - + + + + - + + + - - + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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/ViewController.h b/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Models/JKMarsRover/JKMarsRover.m similarity index 58% rename from Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/ViewController.h rename to Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Models/JKMarsRover/JKMarsRover.m index 99ffeed7..a7342c17 100644 --- a/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/ViewController.h +++ b/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/Models/JKMarsRover/JKMarsRover.m @@ -1,15 +1,13 @@ // -// ViewController.h +// JKMarsRover.m // Astronomy-ObjC // // Created by TuneUp Shop on 3/4/19. // Copyright © 2019 jkaunert. All rights reserved. // -#import - -@interface ViewController : UIViewController +#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/ViewController.m b/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/ViewController.m deleted file mode 100644 index 08ccf4eb..00000000 --- a/Sprint 12/Modules 2&3/Astronomy-ObjC/Astronomy-ObjC/ViewController.m +++ /dev/null @@ -1,23 +0,0 @@ -// -// ViewController.m -// Astronomy-ObjC -// -// Created by TuneUp Shop on 3/4/19. -// Copyright © 2019 jkaunert. All rights reserved. -// - -#import "ViewController.h" - -@interface ViewController () - -@end - -@implementation ViewController - -- (void)viewDidLoad { - [super viewDidLoad]; - // Do any additional setup after loading the view, typically from a nib. -} - - -@end 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! +} From 481615e08cc0c1837540a2fe856500fa5a9fc7b6 Mon Sep 17 00:00:00 2001 From: jkaunert <44586402+jkaunert@users.noreply.github.com> Date: Wed, 13 Mar 2019 19:13:44 -0500 Subject: [PATCH 15/16] App skeleton, models, viewcontollers implemented. --- .../ContactsMRC.xcodeproj/project.pbxproj | 70 +++++-- .../xcschemes/ContactsMRC.xcscheme | 91 +++++++++ .../ContactsMRC/Base.lproj/Main.storyboard | 180 +++++++++++++++++- .../Model Controller/JKContactsController.h | 12 +- .../Model Controller/JKContactsController.m | 24 ++- .../ContactsMRC/ContactsMRC/Model/JKContact.h | 10 + .../ContactsMRC/ContactsMRC/Model/JKContact.m | 23 +++ .../JKContactDetailViewController.h | 7 +- .../JKContactDetailViewController.m | 45 ++++- .../JKContactsTableViewController.h | 2 + .../JKContactsTableViewController.m | 84 +++----- 11 files changed, 458 insertions(+), 90 deletions(-) create mode 100644 Sprint 12/Module 4/ContactsMRC/ContactsMRC.xcodeproj/xcshareddata/xcschemes/ContactsMRC.xcscheme diff --git a/Sprint 12/Module 4/ContactsMRC/ContactsMRC.xcodeproj/project.pbxproj b/Sprint 12/Module 4/ContactsMRC/ContactsMRC.xcodeproj/project.pbxproj index 655b3e73..b1e2efc5 100644 --- a/Sprint 12/Module 4/ContactsMRC/ContactsMRC.xcodeproj/project.pbxproj +++ b/Sprint 12/Module 4/ContactsMRC/ContactsMRC.xcodeproj/project.pbxproj @@ -7,25 +7,34 @@ objects = { /* Begin PBXBuildFile section */ - AB59BEB7223093C500190925 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = AB59BEB6223093C500190925 /* AppDelegate.m */; }; - AB59BEBA223093C500190925 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = AB59BEB9223093C500190925 /* ViewController.m */; }; 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; }; - AB59BEB5223093C500190925 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; - AB59BEB6223093C500190925 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - AB59BEB8223093C500190925 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; - AB59BEB9223093C500190925 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 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 */ @@ -58,10 +67,11 @@ AB59BEB4223093C500190925 /* ContactsMRC */ = { isa = PBXGroup; children = ( - AB59BEB5223093C500190925 /* AppDelegate.h */, - AB59BEB6223093C500190925 /* AppDelegate.m */, - AB59BEB8223093C500190925 /* ViewController.h */, - AB59BEB9223093C500190925 /* ViewController.m */, + AB59BED72231662B00190925 /* AppDelegate.h */, + AB59BED62231662B00190925 /* AppDelegate.m */, + AB59BEDC223166AC00190925 /* Model */, + AB59BED52231659C00190925 /* Model Controller */, + AB59BECE2231652300190925 /* View Controllers */, AB59BEBB223093C500190925 /* Main.storyboard */, AB59BEBE223093C600190925 /* Assets.xcassets */, AB59BEC0223093C600190925 /* LaunchScreen.storyboard */, @@ -71,6 +81,35 @@ 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 */ @@ -141,9 +180,12 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - AB59BEBA223093C500190925 /* ViewController.m in Sources */, AB59BEC5223093C600190925 /* main.m in Sources */, - AB59BEB7223093C500190925 /* AppDelegate.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; }; @@ -178,7 +220,7 @@ CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_ARC = NO; CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; @@ -237,7 +279,7 @@ CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_ARC = NO; CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; 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..f18288ee --- /dev/null +++ b/Sprint 12/Module 4/ContactsMRC/ContactsMRC.xcodeproj/xcshareddata/xcschemes/ContactsMRC.xcscheme @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Sprint 12/Module 4/ContactsMRC/ContactsMRC/Base.lproj/Main.storyboard b/Sprint 12/Module 4/ContactsMRC/ContactsMRC/Base.lproj/Main.storyboard index 942f0bc4..09be5fd4 100644 --- a/Sprint 12/Module 4/ContactsMRC/ContactsMRC/Base.lproj/Main.storyboard +++ b/Sprint 12/Module 4/ContactsMRC/ContactsMRC/Base.lproj/Main.storyboard @@ -1,24 +1,186 @@ - + + + + - + + - - + + - - + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + diff --git a/Sprint 12/Module 4/ContactsMRC/ContactsMRC/Model Controller/JKContactsController.h b/Sprint 12/Module 4/ContactsMRC/ContactsMRC/Model Controller/JKContactsController.h index e295193f..ef46243a 100644 --- a/Sprint 12/Module 4/ContactsMRC/ContactsMRC/Model Controller/JKContactsController.h +++ b/Sprint 12/Module 4/ContactsMRC/ContactsMRC/Model Controller/JKContactsController.h @@ -7,11 +7,17 @@ // #import - -NS_ASSUME_NONNULL_BEGIN +#import "JKContact.h" @interface JKContactsController : NSObject +@property (nonatomic, readonly, strong, nonnull) NSMutableArray *savedContacts; + +- (instancetype)init; + +- (void)saveContactWithName:(NSString *)name + email:(NSString *)phone + email:(NSString *)email; + @end -NS_ASSUME_NONNULL_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 index 8e4191d2..f84d4a07 100644 --- a/Sprint 12/Module 4/ContactsMRC/ContactsMRC/Model Controller/JKContactsController.m +++ b/Sprint 12/Module 4/ContactsMRC/ContactsMRC/Model Controller/JKContactsController.m @@ -8,6 +8,28 @@ #import "JKContactsController.h" -@implementation JKContactsController +@implementation JKContactsController { + NSMutableArray *_savedContacts; +} + +- (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 index fa713485..a5567bf1 100644 --- a/Sprint 12/Module 4/ContactsMRC/ContactsMRC/Model/JKContact.h +++ b/Sprint 12/Module 4/ContactsMRC/ContactsMRC/Model/JKContact.h @@ -12,6 +12,16 @@ 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 index 20f0331f..a989d664 100644 --- a/Sprint 12/Module 4/ContactsMRC/ContactsMRC/Model/JKContact.m +++ b/Sprint 12/Module 4/ContactsMRC/ContactsMRC/Model/JKContact.m @@ -10,4 +10,27 @@ @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 index 43316668..219d96f8 100644 --- a/Sprint 12/Module 4/ContactsMRC/ContactsMRC/View Controllers/JKContactDetailViewController.h +++ b/Sprint 12/Module 4/ContactsMRC/ContactsMRC/View Controllers/JKContactDetailViewController.h @@ -7,10 +7,15 @@ // #import +#import "JKContactsController.h" +#import "JKContactsTableViewController.h" NS_ASSUME_NONNULL_BEGIN -@interface JKContactDetailViewController : UIViewController +@interface JKContactDetailViewController : UIViewController + +@property (nonatomic, nullable, strong) JKContact *contact; +@property (nonatomic, nullable, strong) JKContactsController *contactController; @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 index 1629ce10..373f0743 100644 --- a/Sprint 12/Module 4/ContactsMRC/ContactsMRC/View Controllers/JKContactDetailViewController.m +++ b/Sprint 12/Module 4/ContactsMRC/ContactsMRC/View Controllers/JKContactDetailViewController.m @@ -8,7 +8,18 @@ #import "JKContactDetailViewController.h" -@interface JKContactDetailViewController () + +@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 @@ -16,17 +27,33 @@ @implementation JKContactDetailViewController - (void)viewDidLoad { [super viewDidLoad]; - // Do any additional setup after loading the view. + @autoreleasepool { + _savedContacts = [[NSMutableArray alloc] init]; + + } + + } -/* -#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. + +- (IBAction)saveContact:(id)sender { + @autoreleasepool { + _contact = [[JKContact alloc] initWithName:_contactNameTextField.text email:_contactEmailTextField.text phone:_contactPhoneTextField.text]; + } + + [_savedContacts addObject:_contact]; + NSLog(@"%@", [_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 index 92024298..04f3d8a2 100644 --- a/Sprint 12/Module 4/ContactsMRC/ContactsMRC/View Controllers/JKContactsTableViewController.h +++ b/Sprint 12/Module 4/ContactsMRC/ContactsMRC/View Controllers/JKContactsTableViewController.h @@ -7,6 +7,8 @@ // #import +#import "JKContactDetailViewController.h" +#import "JKContactsController.h" NS_ASSUME_NONNULL_BEGIN diff --git a/Sprint 12/Module 4/ContactsMRC/ContactsMRC/View Controllers/JKContactsTableViewController.m b/Sprint 12/Module 4/ContactsMRC/ContactsMRC/View Controllers/JKContactsTableViewController.m index 64d0c45e..54513a36 100644 --- a/Sprint 12/Module 4/ContactsMRC/ContactsMRC/View Controllers/JKContactsTableViewController.m +++ b/Sprint 12/Module 4/ContactsMRC/ContactsMRC/View Controllers/JKContactsTableViewController.m @@ -8,7 +8,11 @@ #import "JKContactsTableViewController.h" -@interface JKContactsTableViewController () + +@interface JKContactsTableViewController () + +@property (nonatomic, retain, nonnull) JKContactsController *contactController; + @end @@ -17,77 +21,51 @@ @implementation JKContactsTableViewController - (void)viewDidLoad { [super viewDidLoad]; - // Uncomment the following line to preserve selection between presentations. - // self.clearsSelectionOnViewWillAppear = NO; - - // Uncomment the following line to display an Edit button in the navigation bar for this view controller. - // self.navigationItem.rightBarButtonItem = self.editButtonItem; + @autoreleasepool { + _contactController = [[JKContactsController alloc] init]; + } +} + +- (void)viewWillAppear:(BOOL)animated { + [super viewWillAppear:animated]; + [[self tableView] reloadData]; } #pragma mark - Table view data source -- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { -#warning Incomplete implementation, return the number of sections - return 0; -} + - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { -#warning Incomplete implementation, return the number of rows - return 0; + return self.contactController.savedContacts.count; } -/* + - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { - UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:<#@"reuseIdentifier"#> forIndexPath:indexPath]; + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"ContactCell" forIndexPath:indexPath]; // Configure the cell... - + JKContact *contact = [self.contactController.savedContacts objectAtIndex:indexPath.row]; + cell.textLabel.text = contact.name; return cell; } -*/ - -/* -// Override to support conditional editing of the table view. -- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath { - // Return NO if you do not want the specified item to be editable. - return YES; -} -*/ - -/* -// Override to support editing the table view. -- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath { - if (editingStyle == UITableViewCellEditingStyleDelete) { - // Delete the row from the data source - [tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade]; - } else if (editingStyle == UITableViewCellEditingStyleInsert) { - // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view - } -} -*/ -/* -// Override to support rearranging the table view. -- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath { -} -*/ -/* -// Override to support conditional rearranging of the table view. -- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath { - // Return NO if you do not want the item to be re-orderable. - return YES; -} -*/ -/* #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. + if ([segue.identifier isEqual:@"AddContactView"]) { + JKContactDetailViewController *destinationVC = [segue destinationViewController]; + destinationVC.contactController = self.contactController; + }else if ([segue.identifier isEqual:@"ContactDetailView"]) { + JKContactDetailViewController *destinationVC = [segue destinationViewController]; + destinationVC.contactController = self.contactController; + NSIndexPath *selectedRow = self.tableView.indexPathForSelectedRow; + NSInteger row = selectedRow.row; + JKContact *contact = [self.contactController.savedContacts objectAtIndex:row]; + destinationVC.contact = contact; + } } -*/ + @end From 75b4b6a8397d5bdd9481fe273d846c98a41f7a67 Mon Sep 17 00:00:00 2001 From: jkaunert <44586402+jkaunert@users.noreply.github.com> Date: Mon, 13 May 2019 11:44:53 -0500 Subject: [PATCH 16/16] (refactor) refactor JKContactsController.h --- .../xcschemes/ContactsMRC.xcscheme | 5 ++ .../Model Controller/JKContactsController.h | 14 +++--- .../Model Controller/JKContactsController.m | 46 +++++++++++++------ .../JKContactDetailViewController.h | 6 ++- .../JKContactDetailViewController.m | 14 +++--- .../JKContactsTableViewController.m | 25 +++++----- 6 files changed, 70 insertions(+), 40 deletions(-) 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 index f18288ee..8b9245a8 100644 --- a/Sprint 12/Module 4/ContactsMRC/ContactsMRC.xcodeproj/xcshareddata/xcschemes/ContactsMRC.xcscheme +++ b/Sprint 12/Module 4/ContactsMRC/ContactsMRC.xcodeproj/xcshareddata/xcschemes/ContactsMRC.xcscheme @@ -62,6 +62,11 @@ + + #import "JKContact.h" -@interface JKContactsController : NSObject +@interface JKContactsController : NSObject { + NSMutableArray *_savedContacts; +} -@property (nonatomic, readonly, strong, nonnull) NSMutableArray *savedContacts; +@property (nonatomic, readonly, retain, nonnull) NSMutableArray *savedContacts; -- (instancetype)init; ++ (id)sharedController; -- (void)saveContactWithName:(NSString *)name - email:(NSString *)phone - email:(NSString *)email; +//- (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 index f84d4a07..85d89d83 100644 --- a/Sprint 12/Module 4/ContactsMRC/ContactsMRC/Model Controller/JKContactsController.m +++ b/Sprint 12/Module 4/ContactsMRC/ContactsMRC/Model Controller/JKContactsController.m @@ -8,28 +8,46 @@ #import "JKContactsController.h" -@implementation JKContactsController { - NSMutableArray *_savedContacts; +@implementation JKContactsController + ++ (id)sharedController { + static JKContactsController *sharedController = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + sharedController = [[self alloc] init]; + }); + return sharedController; } -- (instancetype)init -{ - self = [super init]; - if (self != nil){ - @autoreleasepool { - _savedContacts = [[NSMutableArray array] retain]; - } - - +- (id)init { + if (self = [super init]) { + _savedContacts = [[NSMutableArray alloc] init]; } 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]; +- (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/View Controllers/JKContactDetailViewController.h b/Sprint 12/Module 4/ContactsMRC/ContactsMRC/View Controllers/JKContactDetailViewController.h index 219d96f8..ebd25ffc 100644 --- a/Sprint 12/Module 4/ContactsMRC/ContactsMRC/View Controllers/JKContactDetailViewController.h +++ b/Sprint 12/Module 4/ContactsMRC/ContactsMRC/View Controllers/JKContactDetailViewController.h @@ -12,10 +12,12 @@ NS_ASSUME_NONNULL_BEGIN -@interface JKContactDetailViewController : UIViewController +@interface JKContactDetailViewController : UIViewController { + JKContactsController *sharedController; +} @property (nonatomic, nullable, strong) JKContact *contact; -@property (nonatomic, nullable, strong) JKContactsController *contactController; +//@property (nonatomic, nullable, strong) JKContactsController *contactController; @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 index 373f0743..2e9c7d73 100644 --- a/Sprint 12/Module 4/ContactsMRC/ContactsMRC/View Controllers/JKContactDetailViewController.m +++ b/Sprint 12/Module 4/ContactsMRC/ContactsMRC/View Controllers/JKContactDetailViewController.m @@ -18,7 +18,7 @@ @interface JKContactDetailViewController () @property (retain, nonatomic) IBOutlet UITextField *contactEmailTextField; -@property (nonatomic, readonly, nonnull) NSMutableArray *savedContacts; +//@property (nonatomic, readonly, nonnull) NSMutableArray *savedContacts; @end @@ -27,10 +27,10 @@ @implementation JKContactDetailViewController - (void)viewDidLoad { [super viewDidLoad]; - @autoreleasepool { - _savedContacts = [[NSMutableArray alloc] init]; - - } +// @autoreleasepool { +// sharedController.savedContacts = [[NSMutableArray alloc] init]; +// +// } } @@ -42,8 +42,8 @@ - (IBAction)saveContact:(id)sender { _contact = [[JKContact alloc] initWithName:_contactNameTextField.text email:_contactEmailTextField.text phone:_contactPhoneTextField.text]; } - [_savedContacts addObject:_contact]; - NSLog(@"%@", [_savedContacts firstObject]); + [sharedController.savedContacts addObject:_contact]; + NSLog(@"%@", [sharedController.savedContacts firstObject]); [self.navigationController popViewControllerAnimated:YES]; } diff --git a/Sprint 12/Module 4/ContactsMRC/ContactsMRC/View Controllers/JKContactsTableViewController.m b/Sprint 12/Module 4/ContactsMRC/ContactsMRC/View Controllers/JKContactsTableViewController.m index 54513a36..cb7fe29a 100644 --- a/Sprint 12/Module 4/ContactsMRC/ContactsMRC/View Controllers/JKContactsTableViewController.m +++ b/Sprint 12/Module 4/ContactsMRC/ContactsMRC/View Controllers/JKContactsTableViewController.m @@ -9,9 +9,11 @@ #import "JKContactsTableViewController.h" -@interface JKContactsTableViewController () +@interface JKContactsTableViewController () { + JKContactsController *sharedController; +} -@property (nonatomic, retain, nonnull) JKContactsController *contactController; +//@property (nonatomic, retain, nonnull) JKContactsController *sharedController; @end @@ -21,13 +23,14 @@ @implementation JKContactsTableViewController - (void)viewDidLoad { [super viewDidLoad]; - @autoreleasepool { - _contactController = [[JKContactsController alloc] init]; - } +// JKContactsController *sharedController = [JKContactsController sharedController]; +// @autoreleasepool { +// _contactController = [[JKContactsController alloc] init]; +// } } - (void)viewWillAppear:(BOOL)animated { - [super viewWillAppear:animated]; + [super viewWillAppear:YES]; [[self tableView] reloadData]; } @@ -36,7 +39,7 @@ - (void)viewWillAppear:(BOOL)animated { - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { - return self.contactController.savedContacts.count; + return sharedController.savedContacts.count; } @@ -44,7 +47,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"ContactCell" forIndexPath:indexPath]; // Configure the cell... - JKContact *contact = [self.contactController.savedContacts objectAtIndex:indexPath.row]; + JKContact *contact = [sharedController.savedContacts objectAtIndex:indexPath.row]; cell.textLabel.text = contact.name; return cell; } @@ -56,13 +59,13 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { if ([segue.identifier isEqual:@"AddContactView"]) { JKContactDetailViewController *destinationVC = [segue destinationViewController]; - destinationVC.contactController = self.contactController; + //destinationVC.sharedController = sharedController; }else if ([segue.identifier isEqual:@"ContactDetailView"]) { JKContactDetailViewController *destinationVC = [segue destinationViewController]; - destinationVC.contactController = self.contactController; + //destinationVC.sharedController = sharedController; NSIndexPath *selectedRow = self.tableView.indexPathForSelectedRow; NSInteger row = selectedRow.row; - JKContact *contact = [self.contactController.savedContacts objectAtIndex:row]; + JKContact *contact = [sharedController.savedContacts objectAtIndex:row]; destinationVC.contact = contact; } }