let replyAction = UIMutableUserNotificationAction()
replyAction.title = "Reply"
replyAction.identifier = "comment-reply"
replyAction.activationMode = .Background
replyAction.requiresAuthentication = false
replyAction.behavior = .TextInput

let category = UIMutableUserNotificationCategory()
category.identifier = "reply"
category.actions = [ replyAction ]

let settings = UIUserNotificationSettings(forTypes: [.Sound, .Alert ], categories: [ category ])

//  사용자가 권한 알림을 받는 지점
UIApplication.sharedApplication().registerUserNotificationSettings(settings)

protocol UIApplicationDelegate {
	func application(application: UIApplication,
					handleActionWithIdentifier identifier : String?
				forLocalNotification notification: UILocalNotification,
			withResponseInfo responseInfo: [ NSObject: AnyObject],
			completionHandler completionHandler: () -> Void) {
		if identifier == "comment-reply",
		let response = responseInfo[UIUserNotificationActionResponseTypedTextKey],
	let responseText = response as? String {
			viewController.appendText(responseText)
		}
	}
}