This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
class MainCoordinator: ApplicationCoordinator { | |
var window: UIWindow | |
var appCoordinator: Coordinator! | |
init(window: UIWindow?) { | |
guard let window = window else { fatalError("Invalid, no window") } | |
self.window = window |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
class MainCoordinator: ApplicationCoordinator { | |
var window: UIWindow | |
var appCoordinator: Coordinator! | |
init(window: UIWindow?) { | |
guard let window = window else { fatalError("Invalid, no window") } | |
self.window = window |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct UserViewModel { | |
var emailText: String | |
var firstNameText: String | |
var lastNameText: String | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
enum CoordinatorType { | |
case app, tabbar | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
protocol CoordinatorDelegate: class { | |
func transitionCoordinator(type: CoordinatorType) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
protocol ApplicationCoordinator { | |
var appCoordinator: Coordinator! { get set } | |
var window: UIWindow { get set } | |
func start() | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import XCTest | |
@testable import TestExample | |
class TestExampleTests: XCTestCase { | |
var math: Math! | |
override func setUp() { | |
super.setUp() | |
self.math = Math() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protocol Calculable { | |
func addition(intOne: Int, intTwo: Int) -> Int | |
func subtraction(intOne: Int, intTwo: Int) -> Int | |
func division(int: Int, by: Int) -> Int | |
} | |
class Math: Calculable { | |
func addition(intOne: Int, intTwo: Int) -> Int { | |
return intOne + intTwo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import XCTest | |
@testable import TestExample | |
class TestExampleTests: XCTestCase { | |
func testEmail() { | |
XCTAssertTrue("[email protected]".isValidEmail()) | |
XCTAssertFalse("chris.com".isValidEmail()) | |
XCTAssertFalse("chris@gmaill".isValidEmail()) | |
} | |
} |