Skip to content

Commit

Permalink
Updated the sizeChanged property to include the sheetsize and the height
Browse files Browse the repository at this point in the history
  • Loading branch information
gordontucker committed Aug 5, 2020
1 parent b734f33 commit 26cc293
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions FittedSheetsPod/SheetViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public class SheetViewController: UIViewController {

public var shouldDismiss: ((SheetViewController) -> Bool)?
public var didDismiss: ((SheetViewController) -> Void)?
public var sizeChanged: ((SheetViewController, CGFloat) -> Void)?
public var sizeChanged: ((SheetViewController, SheetSize, CGFloat) -> Void)?

public private(set) var contentViewController: SheetContentViewController
var overlayView = UIView()
Expand Down Expand Up @@ -325,7 +325,7 @@ public class SheetViewController: UIViewController {
}, completion: { complete in
self.isPanning = false
if previousSize != newSize {
self.sizeChanged?(self, newContentHeight)
self.sizeChanged?(self, newSize, newContentHeight)
}
})
case .possible:
Expand Down Expand Up @@ -411,7 +411,7 @@ public class SheetViewController: UIViewController {
self.view.layoutIfNeeded()
}, completion: { _ in
if previousSize != size {
self.sizeChanged?(self, newHeight)
self.sizeChanged?(self, size, newHeight)
}
self.contentViewController.updateAfterLayout()
complete?()
Expand Down

0 comments on commit 26cc293

Please sign in to comment.