Make delegate weak, allow some container methods to be override
This commit is contained in:
parent
ca374422db
commit
03d0556947
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue