     }
     
     override func viewWillDisappear(animated: Bool) {
-        if let activity = self.userActivity {
+        if let activity = self.senderActivity {
             activity.invalidate()
         }
         if self.isMovingFromParentViewController() || self.isBeingDismissed() {

    lazy var codes: [ParseItem] = self.parseCode()
    let patternLink: String = "<a.*?href=\\\"([http|https].*?)\\\".*?>(.*?)</a>"
    let patternCode: String = "\\`{3}(.*?)\\n((.|\\n)*?)\\`{3}"
    let senderActivity: NSUserActivity? = nil
    
    // MARK: ライフサイクル
    override func viewDidLoad() {


import UIKit

class EntryDetailViewController: BaseViewController {
    
    typealias ParseItem = (label: String, value: String)

