Java代码到swift转换器
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/27920948/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Java code to swift converter
提问by davidrelgr
I'm developing in swift for iOS and i would like to convert my Utils library in java to swift. Is there any online converter to convert simple java code into swift code?
我正在为 iOS 开发 swift,我想将我的 Utils 库在 java 中转换为 swift。是否有任何在线转换器将简单的 java 代码转换为 swift 代码?
采纳答案by Simon
I don't know about a java to swift converter, however, Google developed a Java to objective-C converter, you can find it at https://github.com/google/j2objc
我不知道 java 到 swift 的转换器,但是,谷歌开发了一个 Java 到 Objective-C 的转换器,你可以在https://github.com/google/j2objc找到它
You can use objective c files together with swift files in one project. I think this is the only way to go.
您可以在一个项目中将目标 c 文件与 swift 文件一起使用。我认为这是唯一的出路。