我试图从我使用 UIActivityView 在 swiftUI 中制作的应用程序中分享 Instagram 帖子,但每当我尝试分享它时,只显示图片而标题不显示。同样的事情也发生在 Facebook 上。
func sharePost(){
isSheetShowing.toggle()
let caption = "Hello, world!"
if let image = UIImage(named: "Image") {
let vc = UIActivityViewController(activityItems: [image,caption], applicationActivities: nil)
UIApplication.shared.windows.first?.rootViewController?.present(vc,animated : true)
}
}