Skip to content
Permalink
Browse files

Initial commit

  • Loading branch information
kop16101 committed Apr 6, 2020
0 parents commit a594507d3928f68f05f84324fc0cf37348302d59
Showing with 1,419 additions and 0 deletions.
  1. BIN .DS_Store
  2. +2 −0 .gitattributes
  3. +15 −0 README.md
  4. +635 −0 i2020_03_14_Coordinator.xcodeproj/project.pbxproj
  5. +7 −0 i2020_03_14_Coordinator.xcodeproj/project.xcworkspace/contents.xcworkspacedata
  6. +8 −0 i2020_03_14_Coordinator.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
  7. BIN ...dinator.xcodeproj/project.xcworkspace/xcuserdata/kenny.xcuserdatad/UserInterfaceState.xcuserstate
  8. +14 −0 i2020_03_14_Coordinator.xcodeproj/xcuserdata/kenny.xcuserdatad/xcschemes/xcschememanagement.plist
  9. +14 −0 i2020_03_14_Coordinator.xcodeproj/xcuserdata/pgb15001.xcuserdatad/xcschemes/xcschememanagement.plist
  10. +58 −0 i2020_03_14_Coordinator/AppDelegate.swift
  11. +98 −0 i2020_03_14_Coordinator/Assets.xcassets/AppIcon.appiconset/Contents.json
  12. +6 −0 i2020_03_14_Coordinator/Assets.xcassets/Contents.json
  13. +25 −0 i2020_03_14_Coordinator/Base.lproj/LaunchScreen.storyboard
  14. +104 −0 i2020_03_14_Coordinator/Base.lproj/Main.storyboard
  15. +16 −0 i2020_03_14_Coordinator/Coordinators/Coordinator.swift
  16. +42 −0 i2020_03_14_Coordinator/Coordinators/MainCoordinator.swift
  17. +29 −0 i2020_03_14_Coordinator/Coordinators/Storyboarded.swift
  18. +62 −0 i2020_03_14_Coordinator/Info.plist
  19. +68 −0 i2020_03_14_Coordinator/SceneDelegate.swift
  20. +21 −0 i2020_03_14_Coordinator/ViewControllers/FourthViewController.swift
  21. +20 −0 i2020_03_14_Coordinator/ViewControllers/SecondViewController.swift
  22. +22 −0 i2020_03_14_Coordinator/ViewControllers/ThirdViewController.swift
  23. +32 −0 i2020_03_14_Coordinator/ViewControllers/ViewController.swift
  24. +22 −0 i2020_03_14_CoordinatorTests/Info.plist
  25. +34 −0 i2020_03_14_CoordinatorTests/i2020_03_14_CoordinatorTests.swift
  26. +22 −0 i2020_03_14_CoordinatorUITests/Info.plist
  27. +43 −0 i2020_03_14_CoordinatorUITests/i2020_03_14_CoordinatorUITests.swift
BIN +6 KB .DS_Store
Binary file not shown.
@@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto
@@ -0,0 +1,15 @@
# i2020_03_14_Coordinator

This repository is directly based on Paul Hudson and Soroush Khanlou

See:
https://www.hackingwithswift.com/articles/71/how-to-use-the-coordinator-pattern-in-ios-apps
Paul Hudson

and

khanlou.com
Soroush Khanlou’s blog



Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more.

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
Binary file not shown.
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>i2020_03_14_Coordinator.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
</dict>
</plist>
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>i2020_03_14_Coordinator.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
</dict>
</plist>
@@ -0,0 +1,58 @@
//
// AppDelegate.swift
// i2020_03_14_Coordinator
//
// Created by Bradford, Phillip on 3/14/20.
// Copyright © 2020 Bradford, Phillip. All rights reserved.
//
import UIKit

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

var coordinator: MainCoordinator?
var window: UIWindow?

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// create the main navigation controller to be used for our app
/*
let navController = UINavigationController()
// send that into our coordinator so that it can display view controllers
coordinator = MainCoordinator(navigationController: navController)
// tell the coordinator to take over control
coordinator?.start()
// create a basic UIWindow and activate it
window = UIWindow(frame: UIScreen.main.bounds)
window?.rootViewController = navController
window?.makeKeyAndVisible()
*/

return true
}
/*
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
return true
}
*/
// MARK: UISceneSession Lifecycle
func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
// Called when a new scene session is being created.
// Use this method to select a configuration to create the new scene with.
return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
}

func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>) {
// Called when the user discards a scene session.
// If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
// Use this method to release any resources that were specific to the discarded scenes, as they will not return.
}


}

@@ -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"
}
}
@@ -0,0 +1,6 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" xcode11CocoaTouchSystemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
</document>
@@ -0,0 +1,104 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="16096" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16086"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController storyboardIdentifier="ViewController" id="BYZ-38-t0r" customClass="ViewController" customModule="i2020_03_14_Coordinator" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="8Ku-Bi-s0J">
<rect key="frame" x="131" y="162" width="135" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" systemColor="opaqueSeparatorColor" red="0.77647058820000003" green="0.77647058820000003" blue="0.7843137255" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<state key="normal" title="Second VC"/>
<connections>
<action selector="second:" destination="BYZ-38-t0r" eventType="touchUpInside" id="g6A-iD-uIH"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="4Ke-XJ-FFW">
<rect key="frame" x="131" y="247" width="135" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" systemColor="opaqueSeparatorColor" red="0.77647058820000003" green="0.77647058820000003" blue="0.7843137255" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<state key="normal" title="Third VC">
<color key="titleColor" cocoaTouchSystemColor="darkTextColor"/>
</state>
<connections>
<action selector="third:" destination="BYZ-38-t0r" eventType="touchUpInside" id="zQM-KM-yjQ"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="8HY-L7-xmx">
<rect key="frame" x="131" y="321" width="135" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" systemColor="opaqueSeparatorColor" red="0.77647058820000003" green="0.77647058820000003" blue="0.7843137255" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<state key="normal" title="Fourth VC">
<color key="titleColor" systemColor="systemIndigoColor" red="0.34509803919999998" green="0.33725490200000002" blue="0.83921568629999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<connections>
<action selector="fourth:" destination="BYZ-38-t0r" eventType="touchUpInside" id="E8C-NM-iFW"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-803" y="94"/>
</scene>
<!--Second View Controller-->
<scene sceneID="Gye-4D-EZ7">
<objects>
<viewController storyboardIdentifier="SecondViewController" id="MHe-wj-bwC" customClass="SecondViewController" customModule="i2020_03_14_Coordinator" customModuleProvider="target" colorLabel="IBBuiltInLabel-Red" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="cKM-9H-fBC">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" systemColor="systemOrangeColor" red="1" green="0.58431372550000005" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<viewLayoutGuide key="safeArea" id="guC-0s-blq"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="YCu-pf-ROs" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="294" y="133"/>
</scene>
<!--Third View Controller-->
<scene sceneID="1Rr-hm-VVy">
<objects>
<viewController storyboardIdentifier="ThirdViewController" id="KKY-tR-yUh" customClass="ThirdViewController" customModule="i2020_03_14_Coordinator" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="ZQf-sb-uLp">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" systemColor="systemGreenColor" red="0.20392156859999999" green="0.78039215689999997" blue="0.34901960780000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<viewLayoutGuide key="safeArea" id="WCg-2S-8hG"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="adg-fb-9GQ" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1054" y="133"/>
</scene>
<!--Fourth View Controller-->
<scene sceneID="hTt-hg-49T">
<objects>
<viewController storyboardIdentifier="FourthViewController" id="QBq-xo-AR5" customClass="FourthViewController" customModule="i2020_03_14_Coordinator" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="3gL-TM-s18">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" systemColor="systemIndigoColor" red="0.34509803919999998" green="0.33725490200000002" blue="0.83921568629999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<viewLayoutGuide key="safeArea" id="7lN-mG-Nac"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="MKR-Qo-91T" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1887" y="133"/>
</scene>
</scenes>
</document>
@@ -0,0 +1,16 @@
//
// Coordinator.swift
// i2020_03_14_Coordinator
//
// Created by Bradford, Phillip on 3/14/20.
// Copyright © 2020 Bradford, Phillip. All rights reserved.
//
import UIKit

protocol Coordinator {
var childCoordinators: [Coordinator] { get set }
var navigationController: UINavigationController { get set }

func start()
}

0 comments on commit a594507

Please sign in to comment.
You can’t perform that action at this time.