remove intermediary work files
This commit is contained in:
parent
a4e0203de5
commit
6877763d07
@ -1,43 +0,0 @@
|
|||||||
//
|
|
||||||
// MVMCoreNavigationPopOperation.swift
|
|
||||||
// MVMCore
|
|
||||||
//
|
|
||||||
// Created by Scott Pfeil on 9/1/22.
|
|
||||||
// Copyright © 2022 myverizon. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
import Foundation
|
|
||||||
import UIKit
|
|
||||||
|
|
||||||
open class MVMCoreNavigationPopOperation: MVMCoreOperation, MVMCorePresentationDelegateProtocol {
|
|
||||||
open var navigationController: UINavigationController
|
|
||||||
open var animated: Bool
|
|
||||||
|
|
||||||
private var previousViewController: UIViewController?
|
|
||||||
|
|
||||||
public init(with navigationController: UINavigationController, animated: Bool = true) {
|
|
||||||
self.navigationController = navigationController
|
|
||||||
self.animated = animated
|
|
||||||
}
|
|
||||||
|
|
||||||
open override func main() {
|
|
||||||
checkAndHandleForCancellation()
|
|
||||||
Task { @MainActor in
|
|
||||||
try Task.checkCancellation()
|
|
||||||
guard navigationController.viewControllers.count > 1 else {
|
|
||||||
markAsFinished()
|
|
||||||
return
|
|
||||||
}
|
|
||||||
previousViewController = navigationController.viewControllers[navigationController.viewControllers.count - 2]
|
|
||||||
MVMCoreNavigationHandler2.shared().add(delegate: self)
|
|
||||||
navigationController.popViewController(animated: animated)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public func navigationController(_ navigationController: UINavigationController, displayedViewController viewController: UIViewController) {
|
|
||||||
guard self.navigationController == navigationController,
|
|
||||||
previousViewController == viewController else { return }
|
|
||||||
MVMCoreNavigationHandler2.shared().remove(delegate: self)
|
|
||||||
markAsFinished()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,32 +0,0 @@
|
|||||||
//
|
|
||||||
// MVMCorePresentViewControllerOperation.swift
|
|
||||||
// MVMCore
|
|
||||||
//
|
|
||||||
// Created by Scott Pfeil on 8/30/22.
|
|
||||||
// Copyright © 2022 myverizon. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
import Foundation
|
|
||||||
import UIKit
|
|
||||||
|
|
||||||
open class MVMCoreNavigationPresentOperation: MVMCoreOperation {
|
|
||||||
open var presentedViewController: UIViewController
|
|
||||||
open var presentingViewController: UIViewController
|
|
||||||
open var animated: Bool
|
|
||||||
|
|
||||||
public init(with presentedViewController: UIViewController, presentingViewController: UIViewController, animated: Bool = true) {
|
|
||||||
self.presentedViewController = presentedViewController
|
|
||||||
self.presentingViewController = presentingViewController
|
|
||||||
self.animated = animated
|
|
||||||
}
|
|
||||||
|
|
||||||
open override func main() {
|
|
||||||
checkAndHandleForCancellation()
|
|
||||||
Task { @MainActor in
|
|
||||||
try Task.checkCancellation()
|
|
||||||
presentingViewController.present(presentedViewController, animated: animated) {
|
|
||||||
self.markAsFinished()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,38 +0,0 @@
|
|||||||
//
|
|
||||||
// MVMCoreNavigationPushOperation.swift
|
|
||||||
// MVMCore
|
|
||||||
//
|
|
||||||
// Created by Scott Pfeil on 9/1/22.
|
|
||||||
// Copyright © 2022 myverizon. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
import Foundation
|
|
||||||
import UIKit
|
|
||||||
|
|
||||||
open class MVMCoreNavigationPushOperation: MVMCoreOperation, MVMCorePresentationDelegateProtocol {
|
|
||||||
open var viewController: UIViewController
|
|
||||||
open var navigationController: UINavigationController
|
|
||||||
open var animated: Bool
|
|
||||||
|
|
||||||
public init(with viewController: UIViewController, navigationController: UINavigationController, animated: Bool = true) {
|
|
||||||
self.viewController = viewController
|
|
||||||
self.navigationController = navigationController
|
|
||||||
self.animated = animated
|
|
||||||
}
|
|
||||||
|
|
||||||
open override func main() {
|
|
||||||
checkAndHandleForCancellation()
|
|
||||||
MVMCoreNavigationHandler2.shared().add(delegate: self)
|
|
||||||
Task { @MainActor in
|
|
||||||
try Task.checkCancellation()
|
|
||||||
navigationController.pushViewController(viewController, animated: animated)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public func navigationController(_ navigationController: UINavigationController, displayedViewController viewController: UIViewController) {
|
|
||||||
guard self.navigationController == navigationController,
|
|
||||||
self.viewController == viewController else { return }
|
|
||||||
MVMCoreNavigationHandler2.shared().remove(delegate: self)
|
|
||||||
markAsFinished()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,38 +0,0 @@
|
|||||||
//
|
|
||||||
// MVMCoreNavigationSetOperation.swift
|
|
||||||
// MVMCore
|
|
||||||
//
|
|
||||||
// Created by Scott Pfeil on 9/1/22.
|
|
||||||
// Copyright © 2022 myverizon. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
import Foundation
|
|
||||||
import UIKit
|
|
||||||
|
|
||||||
open class MVMCoreNavigationSetOperation: MVMCoreOperation, MVMCorePresentationDelegateProtocol {
|
|
||||||
open var viewControllers: [UIViewController]
|
|
||||||
open var navigationController: UINavigationController
|
|
||||||
open var animated: Bool
|
|
||||||
|
|
||||||
public init(with viewControllers: [UIViewController], navigationController: UINavigationController, animated: Bool = true) {
|
|
||||||
self.viewControllers = viewControllers
|
|
||||||
self.navigationController = navigationController
|
|
||||||
self.animated = animated
|
|
||||||
}
|
|
||||||
|
|
||||||
open override func main() {
|
|
||||||
checkAndHandleForCancellation()
|
|
||||||
MVMCoreNavigationHandler2.shared().add(delegate: self)
|
|
||||||
Task { @MainActor in
|
|
||||||
try Task.checkCancellation()
|
|
||||||
navigationController.setViewControllers(viewControllers, animated: animated)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public func navigationController(_ navigationController: UINavigationController, displayedViewController viewController: UIViewController) {
|
|
||||||
guard self.navigationController == navigationController,
|
|
||||||
viewControllers.last == viewController else { return }
|
|
||||||
MVMCoreNavigationHandler2.shared().remove(delegate: self)
|
|
||||||
markAsFinished()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue
Block a user