Make delegate weak, allow some container methods to be override

This commit is contained in:
Shadowfacts 2020-01-04 14:34:39 -05:00
parent ca374422db
commit 03d0556947
Signed by: shadowfacts
GPG Key ID: 94A5AB95422746E5
1 changed files with 4 additions and 4 deletions

View File

@ -8,7 +8,7 @@
import UIKit
public protocol SheetContainerViewControllerDelegate {
public protocol SheetContainerViewControllerDelegate: class {
func sheetContainer(_ sheetContainer: SheetContainerViewController, willSnapToDetent detent: Detent) -> Bool
func sheetContainer(_ sheetContainer: SheetContainerViewController, didSnapToDetent detent: Detent)
func sheetContainerContentScrollView(_ sheetContainer: SheetContainerViewController) -> UIScrollView?
@ -29,9 +29,9 @@ public extension SheetContainerViewControllerDelegate {
}
}
public class SheetContainerViewController: UIViewController {
open class SheetContainerViewController: UIViewController {
public var delegate: SheetContainerViewControllerDelegate?
public weak var delegate: SheetContainerViewControllerDelegate?
public let content: UIViewController
@ -72,7 +72,7 @@ public class SheetContainerViewController: UIViewController {
fatalError("init(coder:) has not been implemented")
}
override public func viewDidLoad() {
override open func viewDidLoad() {
super.viewDidLoad()
dimmingView = UIView()