SPStorkController icon indicating copy to clipboard operation
SPStorkController copied to clipboard

Can't integrate pod in objective-c project

Open punto2018 opened this issue 5 years ago • 10 comments

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?

punto2018 avatar Aug 29 '19 15:08 punto2018

Hi! Which pod version you use?

ivanvorobei avatar Aug 29 '19 16:08 ivanvorobei

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

punto2018 avatar Aug 30 '19 06:08 punto2018

I add that I'm importing the library using the following line at the beginning of the class: #import <SPStorkController-Swift.h> Is it correct?

punto2018 avatar Aug 30 '19 06:08 punto2018

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

ivanvorobei avatar Aug 30 '19 11:08 ivanvorobei

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

punto2018 avatar Aug 30 '19 11:08 punto2018

If you solve this problem, write here.

ivanvorobei avatar Aug 30 '19 12:08 ivanvorobei

Just create swift extension to objc class and use swift

Nurka11 avatar Oct 04 '19 03:10 Nurka11

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 < [email protected]> 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 .

punto2018 avatar Oct 04 '19 06:10 punto2018

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 avatar Oct 04 '19 17:10 Nurka11

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

@ivanvorobei you can close this issue

Nurka11 avatar Oct 04 '19 17:10 Nurka11