This file contains 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 OrdersListDisplayLogic: class {} | |
class OrdersListPresenter: OrdersListPresentationLogic { | |
weak var view: OrdersListDisplayLogic? | |
... | |
} |
This file contains 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
// In some builder class: | |
let view = OrdersListViewController() | |
let interactor = OrdersListInteractor() | |
let presenter = OrdersListPresenter() | |
view.interactor = interactor | |
interactor.presenter = presenter | |
presenter.view = view |
This file contains 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 OrdersListDisplayLogic {} | |
protocol OrdersListBusinessLogic {} | |
protocol OrdersListPresentationLogic {} | |
class OrdersListViewController: OrdersListDisplayLogic { | |
var interactor: OrdersListBusinessLogic | |
... | |
} | |
class OrdersListInteractor: OrdersListBusinessLogic { |
This file contains 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
let someModalVC = SomeModalViewController() | |
someModalVC.actionHandler = { [weak someModalVC] in | |
someModalVC?.dismiss(animated: true, completion: nil) | |
} | |
present(someModalVC, animated: true, completion: nil) |
This file contains 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
let someModalVC = SomeModalViewController() | |
someModalVC.actionHandler = { | |
someModalVC.dismiss(animated: true, completion: nil) | |
} | |
present(someModalVC, animated: true, completion: nil) |
This file contains 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
class SomeModalViewController: UIViewController { | |
var actionHandler: (() -> Void)? | |
@IBAction func onTappedAction(_ sender: Any) { | |
actionHandler?() | |
} | |
} |
This file contains 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
NotificationCenter.default.addObserver( | |
forName: .SomethingToObserveNotification, | |
object: nil, | |
queue: .main) { [weak self] notification in | |
self?.handleNotification(notification) | |
} |
This file contains 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
NotificationCenter.default.addObserver( | |
forName: .SomethingToObserverNotification, | |
object: nil, | |
queue: .main, | |
using: handleNotification | |
) |
This file contains 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
// MARK: - Init | |
deinit { | |
NotificationCenter.default.removeObserver(self) | |
} | |
// MARK: - View Life Cycle | |
override func viewDidLoad() { | |
super.viewDidLoad() |
This file contains 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
/usr/bin/xcrun xcodebuild -workspace /Users/vincentchau/Desktop/Carthage/Checkouts/pusher-websocket-swift/PusherSwift.xcworkspace -scheme PusherSwift -configuration Release -derivedDataPath /Users/vincentchau/Library/Caches/org.carthage.CarthageKit/DerivedData/9.2_9C40b/pusher-websocket-swift/5.1.0 -sdk iphoneos ONLY_ACTIVE_ARCH=NO BITCODE_GENERATION_MODE=bitcode CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES archive -archivePath /var/folders/2d/0rf8h8p14h3d6055x6k206_w0000gn/T/pusher-websocket-swift SKIP_INSTALL=YES GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=NO CLANG_ENABLE_CODE_COVERAGE=NO (launched in /Users/vincentchau/Desktop/Carthage/Checkouts/pusher-websocket-swift)User defaults from command line: | |
IDEArchivePathOverride = /var/folders/2d/0rf8h8p14h3d6055x6k206_w0000gn/T/pusher-websocket-swift | |
IDEDerivedDataPathOverride = /Users/vincentchau/Library/Caches/org.carthage.CarthageKit/DerivedData/9.2_9C40b/pusher-websocket-swift/5.1.0 | |
Build settings from command line: | |
BITCODE_GENERATION_MODE = |