Is it possible to write inline assembly in Swift?

坚强是说给别人听的谎言 提交于 2019-11-28 09:44:32

To expand on what Robert Levy said, you can just use the Swift/Obj-C interop feature, and write an Obj-C class that does the ASM stuff, which you can then call from Swift.

It's an annoying workaround, but it should work nonetheless.

You can read more about how to do it [here]

There isn't a way in Swift itself. If you need this, probably a good opportunity to take advantage of Swift-ObjC interop.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!