summaryrefslogtreecommitdiff
path: root/Example Apps/Example Swift/ConnectionContainerViewController.swift
diff options
context:
space:
mode:
Diffstat (limited to 'Example Apps/Example Swift/ConnectionContainerViewController.swift')
-rw-r--r--Example Apps/Example Swift/ConnectionContainerViewController.swift8
1 files changed, 4 insertions, 4 deletions
diff --git a/Example Apps/Example Swift/ConnectionContainerViewController.swift b/Example Apps/Example Swift/ConnectionContainerViewController.swift
index 431888dc9..4e6dd3895 100644
--- a/Example Apps/Example Swift/ConnectionContainerViewController.swift
+++ b/Example Apps/Example Swift/ConnectionContainerViewController.swift
@@ -69,16 +69,16 @@ class ConnectionContainerViewController: UIViewController {
}
// Mark: - View functions
func removeFromView() {
- let vc = self.childViewControllers.last
+ let vc = self.children.last
vc?.view.removeFromSuperview()
- vc?.removeFromParentViewController()
+ vc?.removeFromParent()
}
func loadChildViewController(index: Int?) {
AppUserDefaults.shared.lastUsedSegment = index
let initialViewController: UIViewController = viewControllers[index!]
- self.addChildViewController(initialViewController)
+ self.addChild(initialViewController)
view.addSubview(initialViewController.view)
- initialViewController.didMove(toParentViewController: self)
+ initialViewController.didMove(toParent: self)
}
}