ivanvorobei / SPStorkController

Now playing controller from Apple Music, Mail & Podcasts Apple's apps.
https://opensource.ivanvorobei.io
MIT License
2.74k stars 204 forks source link

Can't integrate pod in objective-c project #99

Open punto2018 opened 5 years ago

punto2018 commented 5 years ago

Hi, I'm integrating the pod in an objective-c project, but I'm facing several issues.

I have the following code:

SPStorkTransitioningDelegate * transitionDelegate = [[SPStorkTransitioningDelegate alloc] init]; transitionDelegate.storkDelegate = self; <---------- ERROR transitionDelegate.confirmDelegate = dialPad; dialPad.modalPresentationStyle = UIModalPresentationCustom; dialPad.transitioningDelegate = transitionDelegate;

The error is: Property 'storkDelegate' not found on object of type 'SPStorkTransitioningDelegate *'

Any advise?

ivanvorobei commented 5 years ago

Hi! Which pod version you use?

punto2018 commented 5 years ago

Hi, thanks for your reply. I'm using cocoapod 1.7.5 and SPStorkController (1.7.9)

punto2018 commented 5 years ago

I add that I'm importing the library using the following line at the beginning of the class:

import

Is it correct?

ivanvorobei commented 5 years ago

I don't know. I am not support objc for this project

punto2018 commented 5 years ago

Not good my friend... anyway I think it is related to the extension class. I will try to dig in it...

ivanvorobei commented 5 years ago

If you solve this problem, write here.

Nurka11 commented 5 years ago

Just create swift extension to objc class and use swift

punto2018 commented 5 years ago

Interesting... I'm new to swift, can you please elaborate? Any source or example? Thanks!

Il giorno ven 4 ott 2019 alle ore 05:26 Nurzhan Ormanali < notifications@github.com> ha scritto:

Just create swift extension to objc class and use swift

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ivanvorobei/SPStorkController/issues/99?email_source=notifications&email_token=AH3I2TT4HYRXB47V3R7YFFTQM2ZXRA5CNFSM4ISD7DV2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAKHYCI#issuecomment-538213385, or mute the thread https://github.com/notifications/unsubscribe-auth/AH3I2TWMSYVHREVLXHC7UPDQM2ZXRANCNFSM4ISD7DVQ .

Nurka11 commented 5 years ago

import SPStorkController

@objc extension VCDealInformation: SPStorkControllerDelegate {

func openPayment() {
    let transitioningDelegate = SPStorkTransitioningDelegate()
    transitioningDelegate.customHeight = 245
    transitioningDelegate.storkDelegate = self
    transitioningDelegate.indicatorColor = .clear

    let rahmetViewController = RahmetRecommendViewController()
    rahmetViewController.modalPresentationStyle = .custom
    rahmetViewController.transitioningDelegate = transitioningDelegate

    self.present(rahmetViewController, animated: true, completion: nil)
}

}

Something like this, just declare extension with @objc and after that build project (because it can not work first time, just wait)

Nurka11 commented 5 years ago

and this should be in separate file not in objc files (.m , .h)

@ivanvorobei you can close this issue