diff --git a/Sources/SwiftCurrent/Models/Workflow.swift b/Sources/SwiftCurrent/Models/Workflow.swift index 20b9f2ab4..b292f2c29 100644 --- a/Sources/SwiftCurrent/Models/Workflow.swift +++ b/Sources/SwiftCurrent/Models/Workflow.swift @@ -13,7 +13,7 @@ import Foundation A doubly linked list of `FlowRepresentableMetadata`s; used to define a process. ### Discussion - In a sufficiently complex application it may make sense to create a structure to hold onto all the workflows in an application. + In a sufficiently complex application, it may make sense to create a structure to hold onto all the workflows in an application. #### Example ```swift diff --git a/Sources/SwiftCurrent/Protocols/FlowRepresentable.swift b/Sources/SwiftCurrent/Protocols/FlowRepresentable.swift index 5ccf9969f..e687a8cdf 100644 --- a/Sources/SwiftCurrent/Protocols/FlowRepresentable.swift +++ b/Sources/SwiftCurrent/Protocols/FlowRepresentable.swift @@ -37,7 +37,7 @@ import Foundation ``` #### Note - Declaring your own custom initializer can result in a compiler error with an unfriendly message + Declaring your own custom initializer can result in a compiler error with an unfriendly message. ```swift class FR1: FlowRepresentable { // Results in compiler error for 'init()' being unavailable weak var _workflowPointer: AnyFlowRepresentable? @@ -56,11 +56,11 @@ public protocol FlowRepresentable { A pointer to the `AnyFlowRepresentable` that erases this `FlowRepresentable`; will automatically be set. ### Discussion - This property is automatically set by a `Workflow`, it simply needs to be declared on a `FlowRepresentable`. - In order for a `FlowRepresentable` to have access to the `Workflow` that launched it, store the closures for proceeding forward and backward, and provide type safety, it needs this property available for writing. + This property is automatically set by a `Workflow`; it simply needs to be declared on a `FlowRepresentable`. + In order for a `FlowRepresentable` to have access to the `Workflow` that launched it, store the closures for proceeding forward and backward, and provide type safety. It needs this property available for writing. #### Note - While not strictly necessary it would be wise to declare this property as `weak`. + While not strictly necessary, it would be wise to declare this property as `weak`. */ var _workflowPointer: AnyFlowRepresentable? { get set } @@ -68,7 +68,7 @@ public protocol FlowRepresentable { Creates a `FlowRepresentable`. #### Note - This is auto synthesized by FlowRepresentable, and is only called when `WorkflowInput` is `Never`. + This is auto-synthesized by FlowRepresentable, and is only called when `WorkflowInput` is `Never`. */ init() /// Creates a `FlowRepresentable` with the specified `WorkflowInput`. @@ -87,7 +87,7 @@ public protocol FlowRepresentable { ### Discussion This method is called *after* `init` but *before* any other lifecycle events. It is non-mutating and should not change the `FlowRepresentable`. - - Important: If you create a superclass that is a `FlowRepresentable` and expect subclasses to define their own `shouldLoad` the superclass should declare `shouldLoad`, and the subclasses should override it. Otherwise you will find the subclasses do not behave as expected. + - Important: If you create a superclass that is a `FlowRepresentable` and expect subclasses to define their own `shouldLoad`, the superclass should declare `shouldLoad`, and the subclasses should override it. Otherwise you will find the subclasses do not behave as expected. #### Note Returning `false` can have different behaviors depending on the `FlowPersistence`. diff --git a/Sources/SwiftCurrent_UIKit/Extensions/UIViewControllerAdditions.swift b/Sources/SwiftCurrent_UIKit/Extensions/UIViewControllerAdditions.swift index 0565cd4bd..d8215d587 100644 --- a/Sources/SwiftCurrent_UIKit/Extensions/UIViewControllerAdditions.swift +++ b/Sources/SwiftCurrent_UIKit/Extensions/UIViewControllerAdditions.swift @@ -83,10 +83,10 @@ extension UIViewController { extension FlowRepresentable where Self: UIViewController { /** - Called when the current workflow should be terminated, and the app should return to the point before the workflow was launched - - Parameter animated: A boolean indicating whether abandoning the workflow should be animated - - Parameter onFinish: A callback after the workflow has been abandoned. - - Note: In order to dismiss UIKit views the workflow must have an `OrchestrationResponder` that is a `UIKitPresenter`. + Called when the current workflow should be terminated, and the app should return to the point before the workflow was launched. + - Parameter animated: a boolean indicating whether abandoning the workflow should be animated. + - Parameter onFinish: a callback after the workflow has been abandoned. + - Note: In order to dismiss UIKit views, the workflow must have an `OrchestrationResponder` that is a `UIKitPresenter`. */ public func abandonWorkflow(animated: Bool = true, onFinish:(() -> Void)? = nil) { workflow?.abandon(animated: animated, onFinish: onFinish)