diff options
author | Joel Fischer <joeljfischer@gmail.com> | 2018-10-04 10:37:25 -0400 |
---|---|---|
committer | Joel Fischer <joeljfischer@gmail.com> | 2018-10-04 10:37:25 -0400 |
commit | 8fae43f2c382f8b4271401b0bdd217fa53964c4a (patch) | |
tree | 8163b8a1987e05f6c6d5a9312272cc0e0f192a9e | |
parent | b0aeade70e1a2e6a18af10696124919f42a57e5d (diff) | |
download | sdl_ios-8fae43f2c382f8b4271401b0bdd217fa53964c4a.tar.gz |
Fix swift app not remembering tab
-rw-r--r-- | Example Apps/Example Swift/ConnectionContainerViewController.swift | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Example Apps/Example Swift/ConnectionContainerViewController.swift b/Example Apps/Example Swift/ConnectionContainerViewController.swift index de7f12898..431888dc9 100644 --- a/Example Apps/Example Swift/ConnectionContainerViewController.swift +++ b/Example Apps/Example Swift/ConnectionContainerViewController.swift @@ -75,7 +75,8 @@ class ConnectionContainerViewController: UIViewController { } func loadChildViewController(index: Int?) { - let initialViewController: UIViewController = viewControllers[index!] as! UIViewController + AppUserDefaults.shared.lastUsedSegment = index + let initialViewController: UIViewController = viewControllers[index!] self.addChildViewController(initialViewController) view.addSubview(initialViewController.view) initialViewController.didMove(toParentViewController: self) |