You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public enum ShareContent {
case Text(text: String)
case Image(image: Data, messageExt: String, action: String, thumbImage: UIImage)
case Link(urlString: String, title: String, description: String, thumbImage: UIImage)
case Music(musicURL: String, dataURL: String, title: String, description: String, thumbImage: UIImage)
case Video(videoURL: String, title: String, description: String, thumbImage: UIImage)
case mediaMessage(WXMediaMessage)
}
使用上会是这样
WechatManager.shared.share(WXSceneSession, .Text(text: "test")) { (result) in
switch result {
case .success(_):
print("分享成功")
case .failure(let e):
print(e.description)
}
}
大家想法是怎样的?
The text was updated successfully, but these errors were encountered:
目前的分享方法
其一是无法得到分享成功失败的回调信息,
其二是无法分享纯文本类型、图片类型、音乐类型、视频类型等信息。
我想法是把分享方法修改成如下:
其中 ShareContent 为一个枚举类型:
使用上会是这样
大家想法是怎样的?
The text was updated successfully, but these errors were encountered: