PanModal icon indicating copy to clipboard operation
PanModal copied to clipboard

Is it compatible to use in Objective-C project?

Open khunshan opened this issue 4 years ago • 1 comments

### Description

I want to know can we use it in a project based on Objective C non-ARC? Does it use any protocol, extensions or anything which is not supported by Objective C?

What type of issue is this? (place an x in one of the [ ])

  • [ ] bug
  • [ ] enhancement (feature request)
  • [X] question
  • [ ] documentation related
  • [ ] testing related
  • [ ] discussion

Requirements (place an x in each of the [ ])

  • [X ] I've read and understood the Contributing guidelines and have done my best effort to follow them.
  • [ X] I've read and agree to the Code of Conduct.
  • [ X] I've searched for any related issues and avoided creating a duplicate issue.

khunshan avatar Jul 14 '20 12:07 khunshan

Yes, you can use, by creating UIViewcontroller Extension in swift and present pan model from view controller extension and call it from your obj c

in UIViewcontroller Extension

@objc func presentPanModelObjc(_ controller: yourViewController)
    {
        presentPanModal(controller)
    }
    

in Obj c view controller

- (void) yourMethodName
{
[self presentPanModelObjc: yourViewController];
}

This is pan model controller it is also need to be create swift

class  YourViewController: PanModalPresentable {

    var panScrollable: UIScrollView? {
        return nil
    }
}

jayaseelanK126 avatar Aug 04 '21 18:08 jayaseelanK126