Skip to content

Instantly share code, notes, and snippets.

Created May 25, 2015 09:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/e45e36c7825e3c145b4b to your computer and use it in GitHub Desktop.
Save anonymous/e45e36c7825e3c145b4b to your computer and use it in GitHub Desktop.
UIActivityViewController memory leaks
import UIKit
class ViewController: UIViewController {
@IBAction func hayatiShare(sender: AnyObject) {
if let textLink = NSURL(string: "http://www.google.com.tr") {
let textToShare = "≪ Hayata Dair Paylaşımlar ≫ \r\n \r\nArama motorunu kullanıp inceleyin: \(textLink)"
let activityVC = UIActivityViewController(activityItems: [textToShare], applicationActivities: nil)
activityVC.setValue("Uygulama", forKey: "subject")
self.presentViewController(activityVC, animated: true, completion: nil)
}
}
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment