Skip to content
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

Delegate not working in Swift #34

Closed
mradzinski opened this issue Dec 10, 2016 · 5 comments
Closed

Delegate not working in Swift #34

mradzinski opened this issue Dec 10, 2016 · 5 comments

Comments

@mradzinski
Copy link

mradzinski commented Dec 10, 2016

For some reason, it seems that the FCAlertViewDelegate causes issues in Swift. Although FCAlertView class is imported and recognized, as soon as I try implementing the delegate (or inherit from it) Swift reports that the class FCAlertView is not defined anymore, which makes little sense because FCAlertViewDelegate (which is part of the same class) is properly recognized.

captura de pantalla 2016-12-10 a las 15 24 22

I do have FCAlertView.h in my bridging header file, so that's not the issue, and sadly I cannot use the Swift version of this pod because we are still stuck with Swift 2.2 and our guidelines forbid the use of libraries which are not part of CocoaPods

@nimati
Copy link
Owner

nimati commented Dec 10, 2016

Hi @mradzinski

Intersting, I'll look into it, just wondering, are you using the Swift version of FCAlertView?

@mradzinski
Copy link
Author

mradzinski commented Dec 10, 2016

@nimati Not really, I'm not sure if the Swift version supports Swift 2.2 (yes, we are still stuck with it). Also, we have strict guidelines regarding libraries which are not part of CocoaPods or have no pod-way to install. The Swift version still lacks pod support, so I'm not able to use it.

@nimati
Copy link
Owner

nimati commented Dec 10, 2016

@mradzinski interesting, the Swift version was contributed by one of FCAlertView's users actually, we're working together to hopefully improve the Swift version in the near future. So right now you're using the Objective-C written version to generate your alert? And the issue is with the delegate functions?

@mradzinski
Copy link
Author

Yes @nimati, I'm using the Obj-c version and the issue happens every time I try implementing the FCAlertViewDelegate protocol. If I delete the protocol from my class FCAlertView gets instantly recognized as a valid class, but if I implement FCAlertViewDelegate then FCAlertView fails to be recognized.

@nimati
Copy link
Owner

nimati commented Dec 11, 2016

Interesting, I'm gonna look into it. In the meantime please send me the screenshot from all the code involved including the bridging header so I can recreate the situation. Cheers! 👍

@nimati nimati closed this as completed Jan 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants