Skip to content

Objective-C support added #65

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions PulleyLib/PulleyViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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]
}

/**
Expand All @@ -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
Expand Down Expand Up @@ -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
{
Expand Down