Created
May 25, 2015 09:50
-
-
Save anonymous/e45e36c7825e3c145b4b to your computer and use it in GitHub Desktop.
UIActivityViewController memory leaks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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