Skip to content

Instantly share code, notes, and snippets.

@darthpelo
Last active September 26, 2018 09:56
Show Gist options
  • Save darthpelo/2132b88fc35d28f30d7ad20e0d5c0858 to your computer and use it in GitHub Desktop.
Save darthpelo/2132b88fc35d28f30d7ad20e0d5c0858 to your computer and use it in GitHub Desktop.
final class HistoryViewController: BaseViewController {
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
if let information = presenter?.information {
activitySetup(information)
}
}
}
extension UIViewController {
func activitySetup(_ information: SiriService.ActivityInformation) {
// make this activity active for the current view controller –
// this is what Siri will restore when the activity is triggered
self.userActivity = SiriService.activitySetup(information)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment