0

是否有任何(直接)方法可以从 ReactJS Native JavaScript 分配 Swift 全局变量(double_t 类型)的值?或者(从 XY 问题缩减)是否有任何其他方法可以在 ReactJS Native JavaScript 中计算(浮点)数字,并从 .swift 文件中访问它?

4

1 回答 1

2

No. At least not directly.

You can make your own Native Module that React Native can call on and get data from. This allows you to write some native code that has a method that can be called to deliver the info you need. Then you write some javascript to that calls that method.

Note the Swift Specific documentation here.

于 2015-10-16T18:15:46.183 回答