-1

I am trying to customize UIActivityViewController but i really confused how to customize.

Code:

let image =  UIImage(named: (self.userProfileModel!.userdata?.image)!) ?? #imageLiteral(resourceName: "app_logo_v6-2")
let text = "Discription: \(String(describing: 
self.userProfileModel!.userdata?.descriptionValue)) \n UserName: \(String(describing: self.userProfileModel!.userdata?.name))"
let shareAll = [text, image] as [Any]
let activityViewController = UIActivityViewController(activityItems: shareAll, applicationActivities: nil)
activityViewController.completionWithItemsHandler = { (activity, success, items, error) in
if success == true
  {
SVProgressHUD.showSuccess(withStatus: "SUCCESS")
    }
 }
UIApplication.visibleNavigationController.present(activityViewController, animated: true, completion: nil)
return

Output:

Screen shot

Here is what I am trying to do:

Share profile Information

UserName: Sham Dhiman

Description: Hello everyone how you

UserImage: Image

Application Name: ABCD


Can someone please explain to me how to solve this , i've tried to solve this issue but no results yet.

Any help would be greatly appreciated.

Thanks in advance.

1 Answers1

2
let shareAll = ["Discription: \(String(describing:self.userProfileModel!.userdata?.descriptionValue)) ", " UserName: \(String(describing: self.userProfileModel!.userdata?.name))", image ?? ""]
AJ_iOS
  • 66
  • 5