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

Fixed swift naming conflict #44

Merged
merged 2 commits into from
Nov 16, 2015
Merged

Fixed swift naming conflict #44

merged 2 commits into from
Nov 16, 2015

Conversation

b-ray
Copy link
Contributor

@b-ray b-ray commented Nov 4, 2015

I'm not sure about the method name, but this is a possible fix for #41.

Apple added the possibility to change the method-selector for Swift using the NS_SWIFT_NAME() macro.
An AcknowledgementsViewController can now be created using VTAcknowledgementsViewController.instantiate().

More info about the NS_SWIFT_NAME()-macro can be found here: https://developer.apple.com/library/ios/documentation/Swift/Conceptual/BuildingCocoaApps/MixandMatch.html
Hope this helps :)

@b-ray
Copy link
Contributor Author

b-ray commented Nov 4, 2015

Oh I just realized that NS_SWIFT_NAME(acknowledgementsViewController()) would work as well, so that the originally reported call VTAcknowledgementsViewController.acknowledgementsViewController() works also from Swift. I'll updated the pull-request if needed?

@vtourraine
Copy link
Owner

Thanks a lot for the pull-request, it looks like you’ve found the magic keyword. 🌟

I would probably choose acknowledgementsViewController() (like you said, it’s only a convenience initializer), but I’m not familiar enough with Swift to give a definitive answer.

Feel free to update the PR as you see fit, and we’ll see if we get more feedback after that.

vtourraine added a commit that referenced this pull request Nov 16, 2015
Fixed swift naming conflict
@vtourraine vtourraine merged commit abf4659 into vtourraine:master Nov 16, 2015
@vtourraine
Copy link
Owner

Awesome, thanks again for the PR. 👍

I plan on shipping that as part of the next release, and we’ll see how it goes.

This pull request was closed.
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

Successfully merging this pull request may close these issues.

2 participants