React Native 和 iOS 分享按钮

dyl*_*lan 1 ios share-button react-native

我正在尝试访问 iOS 的共享按钮,您可以在其中将内容共享到所有服务,包括消息等......知道我该怎么做吗?谢谢

MoO*_*oOx 6

您现在在 react-native 中拥有了一个简单的 Share API。

import { Share } from "react-native"

Share.share(
      {
        title: "a title",
        message: "some message",
        // or
        url: imageReference
      },
      (options)
    );
Run Code Online (Sandbox Code Playgroud)

http://facebook.github.io/react-native/docs/share.html