Text not showing up in UIActivityViewcontroller

274 views Asked by At

I have a share function in my app that calls a uiactivityviewcontroller with text,url and an image to share.

The url and image work fine, but the text doesn't show up..

Here is the code I am using:

    var highscore:Int = NSUserDefaults.standardUserDefaults().integerForKey("highscore")
    var text = "My favourite game: 'Zig Zag!' My highscore: \(highscore)"
    let link = NSURL(string: "https://itunes.apple.com/us/app/go-down!/id101725307?l=nl&ls=1&mt=8")
    let actviewcon = UIActivityViewController(activityItems: [text,link!,shareima!], applicationActivities: nil)
    actviewcon.excludedActivityTypes =  [

        UIActivityTypePrint,
        UIActivityTypeCopyToPasteboard,
        UIActivityTypeAssignToContact,
        UIActivityTypeSaveToCameraRoll,
        UIActivityTypeAddToReadingList,
    ]
    actviewcon.completionWithItemsHandler = {
        (activity, success, items, error) in
        //println("Activity: \(activity) Success: \(success) Items: \(items) Error: \(error)")
    }
    self.presentViewController(actviewcon, animated: true, completion: nil)
}
0

There are 0 answers