Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  Coordinator.swift   Sprache: JAVA

 

import UIKit

@MainActor
public protocol Coordinator: AnyObject {
    
    // MARK: - Properties
    
    /// Collection of child coordinators to keep track of
    var childCoordinators: [any Coordinator] { get set }
    
    var rootViewController: UIViewController { get }
    
    // MARK: -  Presentation
    
    /// Initiates the coordinator's flow by creating and presenting its initial view controller.
    ///
    /// This method serves as the entry point for the coordinator, responsible for:
    /// - Instantiating the first view controller in the flow
    /// - Configuring the view controller with necessary dependencies
    /// - Presenting or pushing the view controller onto the navigation stack
    ///
    /// Call this method when you want to begin the coordinator's managed flow.
    ///
    /// - Note: This method should be called only once per coordinator lifecycle to avoid
    ///         duplicate presentations.
    ///
    /// Example:
    /// ```swift
    /// let coordinator = LoginCoordinator(navigationController: navController)
    /// // Begins the login flow
    /// coordinator.start()
    /// ```
    func start()

    /// Tears the coordinator down so its parent can discard it.
    ///
    /// Implementations must stop observing notifications, unbind routers, and
    /// dismiss any presentation they own — then finish their children. A finished
    /// coordinator must not be started again.
    ///
    /// The default implementation finishes all children and empties
    /// `childCoordinators`.
    func finish()
}

extension Coordinator {
    /// Removes the given `Coordinator` from it's parents child coordinators
    /// - Parameter child: Child to be removed
    public func childDidFinish(_ child: any Coordinator) {
        childCoordinators.removeAll {
            $0 === child
        }
    }

    public func finish() {
        for child in childCoordinators {
            child.finish()
        }
        childCoordinators.removeAll()
    }
}

Messung
CHZG
839610093

¤ Dauer der Verarbeitung: 0.4 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover


Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1104845
#Domains=499267