Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alpha 0.1.2 #4

Merged
merged 2 commits into from
Mar 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Sources/ModalSheetTransition.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import UIKit
presentationController.largestUndimmedDetent = presentedModalSheet.largestUndimmedDetent
presentationController.prefersGrabberVisible = presentedModalSheet.prefersGrabberVisible
presentationController.preferredCornerRadius = presentedModalSheet.preferredCornerRadius
presentationController.delegate = presentedModalSheet.delegate
presentationController.delegate = presentedModalSheet.modalSheetDelegate
return presentationController
}
}
6 changes: 3 additions & 3 deletions Sources/ModalSheetTransitioning.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import UIKit

@MainActor public protocol ModalSheetTransitioning: UIViewController {
/// The delegate object for managing adaptive presentations.
var delegate: ModalSheetPresentationControllerDelegate? { get }
var modalSheetDelegate: ModalSheetPresentationControllerDelegate? { get }

/// The preferred corner radius of the sheet when presented.
/// This value is only respected when the sheet is at the front of its stack.
Expand Down Expand Up @@ -31,9 +31,9 @@ import UIKit

// MARK: - ModalSheetTransitioning defaults

extension ModalSheetTransitioning {
public extension ModalSheetTransitioning {

var delegate: ModalSheetPresentationControllerDelegate? {
var modalSheetDelegate: ModalSheetPresentationControllerDelegate? {
return nil
}

Expand Down
3 changes: 1 addition & 2 deletions Sources/UIViewController+ModalSheet.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import UIKit

@MainActor public extension UIViewController {

public extension UIViewController {
func presentModalSheet(_ viewControllerToPresent: ModalSheetTransitioning, animated: Bool, completion: (()->Void)? = nil) {
viewControllerToPresent.modalPresentationStyle = .custom
viewControllerToPresent.transitioningDelegate = ModalSheetTransition.shared
Expand Down