diff --git a/PulleyLib/PulleyViewController.swift b/PulleyLib/PulleyViewController.swift index 3341b98..b8f141e 100644 --- a/PulleyLib/PulleyViewController.swift +++ b/PulleyLib/PulleyViewController.swift @@ -21,11 +21,11 @@ import UIKit /** * View controllers in the drawer can implement this to receive changes in state or provide values for the different drawer positions. */ -public protocol PulleyDrawerViewControllerDelegate: PulleyDelegate { +@objc public protocol PulleyDrawerViewControllerDelegate: PulleyDelegate { - func collapsedDrawerHeight() -> CGFloat - func partialRevealDrawerHeight() -> CGFloat - func supportedDrawerPositions() -> [PulleyPosition] + @objc func collapsedDrawerHeight() -> CGFloat + @objc func partialRevealDrawerHeight() -> CGFloat + @objc func supportedDrawerPositions() -> [Int] } /** @@ -49,7 +49,7 @@ public typealias PulleyAnimationCompletionBlock = ((_ finished: Bool) -> Void) - open: When the drawer is fully open. - closed: When the drawer is off-screen at the bottom of the view. Note: Users cannot close or reopen the drawer on their own. You must set this programatically */ -public enum PulleyPosition: Int { +@objc public enum PulleyPosition: Int { case collapsed = 0 case partiallyRevealed = 1 @@ -705,7 +705,7 @@ open class PulleyViewController: UIViewController { { if let drawerVCCompliant = drawerContentViewController as? PulleyDrawerViewControllerDelegate { - supportedDrawerPositions = drawerVCCompliant.supportedDrawerPositions() + supportedDrawerPositions = drawerVCCompliant.supportedDrawerPositions().map{ PulleyPosition(rawValue:$0)! } } else {