Skip to content

Commit

Permalink
Updated documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ekazaev committed Apr 11, 2023
1 parent c978b85 commit a0245b6
Show file tree
Hide file tree
Showing 325 changed files with 709 additions and 681 deletions.
4 changes: 2 additions & 2 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PODS:
- RouteComposer (2.10.2)
- RouteComposer (2.10.3)
- SwiftFormat/CLI (0.43.5)

DEPENDENCIES:
Expand All @@ -15,7 +15,7 @@ EXTERNAL SOURCES:
:path: "../"

SPEC CHECKSUMS:
RouteComposer: 37f0a7dfe42fd1200a857cd6bf8582f0b6113e4e
RouteComposer: f185d410da2c67bc90d93fc4618842fe47d92bca
SwiftFormat: 352ea545e3e13cfd7a449e621c1f3c2e244d4906

PODFILE CHECKSUM: fc9566202a2f646e3cbb198c10cf157d9dd60f4f
Expand Down
4 changes: 2 additions & 2 deletions Example/Pods/Local Podspecs/RouteComposer.podspec.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Example/Pods/Manifest.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,13 @@ extension ExampleScreenConfiguration {
StepAssembly(
finder: ColorViewControllerFinder(),
factory: ColorViewControllerFactory())
.adding(DismissalMethodProvidingContextTask(dismissalBlock: { viewController, context, animated, completion in
.adding(DismissalMethodProvidingContextTask<ColorViewController, String>(dismissalBlock: { viewController, context, animated, completion in
// Demonstrates ability to provide a dismissal method in the configuration using `DismissalMethodProvidingContextTask`
UIViewController.router.commitNavigation(to: GeneralStep.custom(using: PresentingFinder()), with: context, animated: animated, completion: completion)
UIViewController.router.commitNavigation(to: GeneralStep.custom(using: PresentingFinder(startingPoint: .custom(viewController))),
with: context,
animated: animated,
completion: completion)
// You can just call `viewController.dismiss(animated: true) if needed.`
}))
.adding(ExampleGenericContextTask<ColorViewController, String>())
.using(ExampleNavigationController.push())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ struct SwiftUIContentView: View, ContextInstantiatable, ContextChecking, Context
Text("Go to Square Tab")
}).accessibility(identifier: "SwiftUI+\(context)")
}.onAppear {
self.context = self.currentContext
context = currentContext
}
}

Expand Down
2 changes: 1 addition & 1 deletion Example/Tests/ActionTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ class ActionTests: XCTestCase {
}

wasInCompletion = false
GeneralAction.presentModally(startingFrom: .custom(try testThrow())).perform(with: UIViewController(), on: UIViewController(), animated: true, completion: { result in
try GeneralAction.presentModally(startingFrom: .custom(testThrow())).perform(with: UIViewController(), on: UIViewController(), animated: true, completion: { result in
wasInCompletion = true
if result.isSuccessful {
XCTAssert(false)
Expand Down
2 changes: 1 addition & 1 deletion Example/Tests/FinderTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ class FinderTest: XCTestCase {
throw RoutingError.generic(.init("Test Error"))
}

XCTAssertNotEqual(DefaultStackIterator.StartingPoint.custom(try throwsException()), DefaultStackIterator.StartingPoint.custom(currentViewController1))
XCTAssertNotEqual(try DefaultStackIterator.StartingPoint.custom(throwsException()), DefaultStackIterator.StartingPoint.custom(currentViewController1))
XCTAssertNotEqual(DefaultStackIterator.StartingPoint.topmost, DefaultStackIterator.StartingPoint.root)
XCTAssertNotEqual(DefaultStackIterator.StartingPoint.topmost, DefaultStackIterator.StartingPoint.custom(currentViewController))
}
Expand Down
4 changes: 2 additions & 2 deletions RouteComposer/Classes/Extra/DispatchQueue+Action.swift
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public struct DispatchQueueWrappedAction<A: Action>: Action {
completion(result)
return
}
DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + self.timeInterval) {
DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + timeInterval) {
completion(result)
}
})
Expand Down Expand Up @@ -112,7 +112,7 @@ public struct DispatchQueueWrappedContainerAction<A: ContainerAction>: Container
completion(result)
return
}
DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + self.timeInterval) {
DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + timeInterval) {
completion(result)
}
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public struct NavigationDelayingInterceptor<Context>: RoutingInterceptor {
logger?.log(.info("\(topmostViewController) is changing its state. Navigation has been postponed."))
let deadline = DispatchTime.now() + .milliseconds(100)
DispatchQueue.main.asyncAfter(deadline: deadline) {
self.perform(with: context, completion: completion)
perform(with: context, completion: completion)
}
}

Expand Down
2 changes: 1 addition & 1 deletion RouteComposer/Classes/Extra/SingleNavigationRouter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public struct SingleNavigationRouter<R>: Router where R: Router {
lock.startNavigation()
do {
try router.navigate(to: step, with: context, animated: animated, completion: { success in
self.lock.stopNavigation()
lock.stopNavigation()
completion?(success)
})
} catch {
Expand Down
4 changes: 2 additions & 2 deletions RouteComposer/Classes/Router/DefaultRouter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ public struct DefaultRouter: InterceptableRouter, MainThreadChecking {
// continue navigation process. This operation is async.
let initialControllerDescription = String(describing: viewController)
taskStack.performInterceptors { [weak viewController] result in
self.assertIfNotMainThread(logger: logger)
assertIfNotMainThread(logger: logger)

if case let .failure(error) = result {
completion(.failure(error))
Expand Down Expand Up @@ -259,7 +259,7 @@ public struct DefaultRouter: InterceptableRouter, MainThreadChecking {
with: postponedIntegrationHandler,
nextAction: nextAction,
animated: animated) { result in
self.assertIfNotMainThread(logger: logger)
assertIfNotMainThread(logger: logger)
guard result.isSuccessful else {
logger?.log(.info("\(String(describing: factory.factory.action)) has stopped the navigation process " +
"as it was not able to build a view controller into a stack."))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public struct DefaultStackPresentationHandler: StackPresentationHandler, MainThr
if let presentedController = viewController.presentedViewController {
if !presentedController.isBeingDismissed {
viewController.dismiss(animated: animated) {
self.logger?.log(.info("Dismissed all the view controllers presented from \(String(describing: viewController))"))
logger?.log(.info("Dismissed all the view controllers presented from \(String(describing: viewController))"))
completion(.success)
}
} else {
Expand Down Expand Up @@ -81,7 +81,7 @@ public struct DefaultStackPresentationHandler: StackPresentationHandler, MainThr
completion(result)
return
}
self.logger?.log(.info("Made \(String(describing: viewController)) visible in \(String(describing: container))"))
logger?.log(.info("Made \(String(describing: viewController)) visible in \(String(describing: container))"))
makeVisible(viewController: parentViewController, completion: completion)
})
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ struct InterceptorMultiplexer: AnyRoutingInterceptor, MainThreadChecking, Custom
func runInterceptor(interceptor: AnyRoutingInterceptor) {
assertIfNotMainThread()
interceptor.perform(with: context) { result in
self.assertIfNotMainThread()
assertIfNotMainThread()
if case .failure = result {
completion(result)
} else if interceptors.isEmpty {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ struct ActionBox<A: Action>: AnyAction, AnyActionBox, CustomStringConvertible, M
completion(result)
return
}
self.action.perform(with: viewController, on: typedExistingViewController, animated: animated) { result in
self.assertIfNotMainThread()
action.perform(with: viewController, on: typedExistingViewController, animated: animated) { result in
assertIfNotMainThread()
completion(result)
}
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ struct ContainerActionBox<A: ContainerAction>: AnyAction, AnyActionBox, CustomSt
completion(result)
return
}
self.perform(with: viewController,
on: existingController,
with: postponedIntegrationHandler,
nextAction: nextAction,
animated: animated,
completion: completion)
perform(with: viewController,
on: existingController,
with: postponedIntegrationHandler,
nextAction: nextAction,
animated: animated,
completion: completion)
})
return
}
Expand All @@ -60,16 +60,16 @@ struct ContainerActionBox<A: ContainerAction>: AnyAction, AnyActionBox, CustomSt
completion(result)
return
}
self.embed(viewController: viewController, with: postponedIntegrationHandler, completion: completion)
embed(viewController: viewController, with: postponedIntegrationHandler, completion: completion)
})
} else {
postponedIntegrationHandler.purge(animated: animated, completion: { result in
guard result.isSuccessful else {
completion(result)
return
}
self.action.perform(with: viewController, on: containerController, animated: animated) { result in
self.assertIfNotMainThread()
action.perform(with: viewController, on: containerController, animated: animated) { result in
assertIfNotMainThread()
completion(result)
}
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ struct RoutingInterceptorBox<RI: RoutingInterceptor>: AnyRoutingInterceptor, Pre
assertIfNotPrepared()
assertIfNotMainThread()
routingInterceptor.perform(with: typedContext) { result in
self.assertIfNotMainThread()
assertIfNotMainThread()
completion(result)
}
} catch {
Expand Down
2 changes: 1 addition & 1 deletion RouteComposer/Classes/SearchOptions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public struct SearchOptions: OptionSet, CaseIterable, CustomStringConvertible {

public var description: String {
SearchOptions.allCases.compactMap { option in
guard self.contains(option) else {
guard contains(option) else {
return nil
}
switch option {
Expand Down
4 changes: 2 additions & 2 deletions docs/Additional Assemblies.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="index.html">
RouteComposer 2.10.2 Docs
RouteComposer 2.10.3 Docs
</a>
(100% documented)
</p>
Expand Down Expand Up @@ -620,7 +620,7 @@ <h4>Declaration</h4>
</article>
</div>
<section class="footer">
<p>&copy; 2022 <a class="link" href="https://github.com/ekazaev" target="_blank" rel="external noopener">Evgeny Kazaev</a>. All rights reserved. (Last updated: 2022-12-21)</p>
<p>&copy; 2023 <a class="link" href="https://github.com/ekazaev" target="_blank" rel="external noopener">Evgeny Kazaev</a>. All rights reserved. (Last updated: 2023-04-11)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
</section>
</body>
Expand Down
4 changes: 2 additions & 2 deletions docs/Assemblies.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="index.html">
RouteComposer 2.10.2 Docs
RouteComposer 2.10.3 Docs
</a>
(100% documented)
</p>
Expand Down Expand Up @@ -747,7 +747,7 @@ <h4>Declaration</h4>
</article>
</div>
<section class="footer">
<p>&copy; 2022 <a class="link" href="https://github.com/ekazaev" target="_blank" rel="external noopener">Evgeny Kazaev</a>. All rights reserved. (Last updated: 2022-12-21)</p>
<p>&copy; 2023 <a class="link" href="https://github.com/ekazaev" target="_blank" rel="external noopener">Evgeny Kazaev</a>. All rights reserved. (Last updated: 2023-04-11)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
</section>
</body>
Expand Down
4 changes: 2 additions & 2 deletions docs/Classes/ActionToStepIntegrator.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="../index.html">
RouteComposer 2.10.2 Docs
RouteComposer 2.10.3 Docs
</a>
(100% documented)
</p>
Expand Down Expand Up @@ -786,7 +786,7 @@ <h4>Parameters</h4>
</article>
</div>
<section class="footer">
<p>&copy; 2022 <a class="link" href="https://github.com/ekazaev" target="_blank" rel="external noopener">Evgeny Kazaev</a>. All rights reserved. (Last updated: 2022-12-21)</p>
<p>&copy; 2023 <a class="link" href="https://github.com/ekazaev" target="_blank" rel="external noopener">Evgeny Kazaev</a>. All rights reserved. (Last updated: 2023-04-11)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
</section>
</body>
Expand Down
4 changes: 2 additions & 2 deletions docs/Classes/CompleteFactoryAssembly.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="../index.html">
RouteComposer 2.10.2 Docs
RouteComposer 2.10.3 Docs
</a>
(100% documented)
</p>
Expand Down Expand Up @@ -1109,7 +1109,7 @@ <h4>Return Value</h4>
</article>
</div>
<section class="footer">
<p>&copy; 2022 <a class="link" href="https://github.com/ekazaev" target="_blank" rel="external noopener">Evgeny Kazaev</a>. All rights reserved. (Last updated: 2022-12-21)</p>
<p>&copy; 2023 <a class="link" href="https://github.com/ekazaev" target="_blank" rel="external noopener">Evgeny Kazaev</a>. All rights reserved. (Last updated: 2023-04-11)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
</section>
</body>
Expand Down
4 changes: 2 additions & 2 deletions docs/Classes/CompleteFactoryChainAssembly.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="../index.html">
RouteComposer 2.10.2 Docs
RouteComposer 2.10.3 Docs
</a>
(100% documented)
</p>
Expand Down Expand Up @@ -1102,7 +1102,7 @@ <h4>Return Value</h4>
</article>
</div>
<section class="footer">
<p>&copy; 2022 <a class="link" href="https://github.com/ekazaev" target="_blank" rel="external noopener">Evgeny Kazaev</a>. All rights reserved. (Last updated: 2022-12-21)</p>
<p>&copy; 2023 <a class="link" href="https://github.com/ekazaev" target="_blank" rel="external noopener">Evgeny Kazaev</a>. All rights reserved. (Last updated: 2023-04-11)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
</section>
</body>
Expand Down
4 changes: 2 additions & 2 deletions docs/Classes/GenericStepAssembly.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="../index.html">
RouteComposer 2.10.2 Docs
RouteComposer 2.10.3 Docs
</a>
(100% documented)
</p>
Expand Down Expand Up @@ -786,7 +786,7 @@ <h4>Parameters</h4>
</article>
</div>
<section class="footer">
<p>&copy; 2022 <a class="link" href="https://github.com/ekazaev" target="_blank" rel="external noopener">Evgeny Kazaev</a>. All rights reserved. (Last updated: 2022-12-21)</p>
<p>&copy; 2023 <a class="link" href="https://github.com/ekazaev" target="_blank" rel="external noopener">Evgeny Kazaev</a>. All rights reserved. (Last updated: 2023-04-11)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
</section>
</body>
Expand Down
4 changes: 2 additions & 2 deletions docs/Classes/InlineContextTransformer.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="../index.html">
RouteComposer 2.10.2 Docs
RouteComposer 2.10.3 Docs
</a>
(100% documented)
</p>
Expand Down Expand Up @@ -652,7 +652,7 @@ <h4>Declaration</h4>
</article>
</div>
<section class="footer">
<p>&copy; 2022 <a class="link" href="https://github.com/ekazaev" target="_blank" rel="external noopener">Evgeny Kazaev</a>. All rights reserved. (Last updated: 2022-12-21)</p>
<p>&copy; 2023 <a class="link" href="https://github.com/ekazaev" target="_blank" rel="external noopener">Evgeny Kazaev</a>. All rights reserved. (Last updated: 2023-04-11)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
</section>
</body>
Expand Down
Loading

0 comments on commit a0245b6

Please sign in to comment.