Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool {
- if userActivity.activityType == "com.azamsharp.HotCoffee.activity-type" {
- if let userInfo = userActivity.userInfo,
- let coffeeCupSize = userInfo["CoffeeCupSize"] as? Int
- {
- guard let vc = window?.rootViewController as? ViewController else {
- fatalError("No root view controller found")
- }
- vc.coffeeSizeSegmentedControl.selectedSegmentIndex = coffeeCupSize
- }
- }
- return true
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement