Skip to content

Commit

Permalink
Formatted the code
Browse files Browse the repository at this point in the history
  • Loading branch information
ekazaev committed Jun 27, 2023
1 parent f69c43c commit f880276
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
12 changes: 6 additions & 6 deletions Example/Tests/ActionTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ class ActionTests: XCTestCase {
preferredContentSize: CGSize(width: 100, height: 100),
isModalInPresentation: true,
presentationConfiguration: { _ in
wasInPresentationConfig = true
}).perform(with: viewController, on: PresentingModallyController(), animated: true, completion: { result in
wasInPresentationConfig = true
}).perform(with: viewController, on: PresentingModallyController(), animated: true, completion: { result in
wasInCompletion = true
XCTAssertEqual(viewController.modalPresentationStyle, UIModalPresentationStyle.fullScreen)
XCTAssertEqual(viewController.modalTransitionStyle, UIModalTransitionStyle.crossDissolve)
Expand Down Expand Up @@ -238,10 +238,10 @@ class ActionTests: XCTestCase {
preferredContentSize: CGSize(width: 100, height: 100),
isModalInPresentation: true,
presentationConfiguration: {
if let sheetPresentationController = $0 as? UISheetPresentationController {
wasInSheetPresentationConfig = true
}
}).perform(with: viewController, on: PresentingModallyController(), animated: true, completion: { result in
if let _ = $0 as? UISheetPresentationController {
wasInSheetPresentationConfig = true
}
}).perform(with: viewController, on: PresentingModallyController(), animated: true, completion: { result in
wasInCompletion = true
XCTAssertEqual(viewController.modalPresentationStyle, UIModalPresentationStyle.pageSheet)
XCTAssertEqual(viewController.modalTransitionStyle, UIModalTransitionStyle.crossDissolve)
Expand Down
16 changes: 8 additions & 8 deletions RouteComposer/Classes/Actions/UIViewController+Action.swift
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@ public extension GeneralAction {
/// - preferredContentSize: The preferredContentSize is used for any container laying out a child view controller.
/// - popoverControllerConfigurationBlock: Block to configure `UIPopoverPresentationController`.
static func presentModally(startingFrom presentationStartingPoint: ViewControllerActions.PresentModallyAction.ModalPresentationStartingPoint = .current,
presentationStyle: UIModalPresentationStyle? = .fullScreen,
transitionStyle: UIModalTransitionStyle? = .coverVertical,
transitioningDelegate: UIViewControllerTransitioningDelegate? = nil,
preferredContentSize: CGSize? = nil,
isModalInPresentation: Bool? = nil,
popoverConfiguration: ((_: UIPopoverPresentationController) -> Void)? = nil) -> ViewControllerActions.PresentModallyAction {
presentationStyle: UIModalPresentationStyle? = .fullScreen,
transitionStyle: UIModalTransitionStyle? = .coverVertical,
transitioningDelegate: UIViewControllerTransitioningDelegate? = nil,
preferredContentSize: CGSize? = nil,
isModalInPresentation: Bool? = nil,
popoverConfiguration: ((_: UIPopoverPresentationController) -> Void)? = nil) -> ViewControllerActions.PresentModallyAction {
ViewControllerActions.PresentModallyAction(startingFrom: presentationStartingPoint,
presentationStyle: presentationStyle,
transitionStyle: transitionStyle,
Expand Down Expand Up @@ -206,8 +206,8 @@ public enum ViewControllerActions {
if let preferredContentSize {
viewController.preferredContentSize = preferredContentSize
}
if let presentationController = viewController.presentationController,
let presentationControllerConfigurationBlock {
if let presentationController = viewController.presentationController,
let presentationControllerConfigurationBlock {
presentationControllerConfigurationBlock(presentationController)
}
if #available(iOS 13, *),
Expand Down

0 comments on commit f880276

Please sign in to comment.