Skip to content

Commit

Permalink
optional methods default implementation for xcode12 (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
naveen-c authored Oct 5, 2020
1 parent 1d11784 commit 5195078
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions ContentSheet/Classes/ContentSheet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1046,6 +1046,11 @@ extension UIViewController: ContentSheetContentProtocol {
@objc open func dismissContentSheet(animated flag: Bool, completion: (() -> Swift.Void)? = nil) {
self.contentSheet()?.dismiss(animated: true, completion: completion)
}

open func contentSheetWillBeginTouchHandling(_ sheet: ContentSheet) {

}

}


Expand Down Expand Up @@ -1095,6 +1100,19 @@ extension UIView: ContentSheetContentProtocol {
@objc public func contentSheet() -> ContentSheet? {
return ContentSheet.contentSheet(content: self)
}

open func collapsedHeight(containedIn contentSheet: ContentSheet) -> CGFloat {
return 0
}

open func expandedHeight(containedIn contentSheet: ContentSheet) -> CGFloat {
return 0
}

open func scrollViewToObserve(containedIn contentSheet: ContentSheet) -> UIScrollView? {
return nil
}

}

extension UIView {
Expand Down

0 comments on commit 5195078

Please sign in to comment.