Я использую общий лист в своем приложении iOS. Я пытаюсь выяснить, как я могу добавить значок в верхнем левом углу, когда он открылся. Я добавил фото пример того, что я имею в виду.
[Пример фото того, что я имею в виду] [1]
@IBAction func shareButtonClicked(_ sender: Any) {
//Set the default sharing message.
let message = "Check out Num8r, Its so much fun!"
let link = NSURL(string: "https://apps.apple.com/us/app/num8r/id1497392799")
// Screenshot:
UIGraphicsBeginImageContextWithOptions(self.view.frame.size, true, 0.0)
self.view.drawHierarchy(in: self.view.frame, afterScreenUpdates: false)
let img = UIGraphicsGetImageFromCurrentImageContext()
UIGraphicsEndImageContext()
//Set the link, message, image to share.
if let link = link, let img = img {
let objectsToShare = [message,link,img] as [Any]
let activityVC = UIActivityViewController(activityItems: objectsToShare, applicationActivities: nil)
activityVC.excludedActivityTypes = [UIActivity.ActivityType.airDrop, UIActivity.ActivityType.addToReadingList]
self.present(activityVC, animated: true, completion: nil)
}
}