Convert to Swift 4.0 syntax
This commit is contained in:
@@ -37,11 +37,11 @@ class MainViewController: UIViewController, SwitchesViewControllerDelegate
|
||||
|
||||
self.view.backgroundColor = UIColor.black
|
||||
|
||||
self.addChildViewController(_visualizationController)
|
||||
self.addChild(_visualizationController)
|
||||
self.view.addSubview(_visualizationController.view)
|
||||
|
||||
_switchesController.delegate = self
|
||||
self.addChildViewController(_switchesController)
|
||||
self.addChild(_switchesController)
|
||||
self.view.addSubview(_switchesController.view)
|
||||
|
||||
self.view.addSubview(_headerView)
|
||||
|
||||
@@ -213,7 +213,7 @@ class SwitchesViewController: UIViewController,
|
||||
|
||||
for i in ActionCell.count ..< collectionView.numberOfItems(inSection: indexPath.section) {
|
||||
if let cell = collectionView.cellForItem(at: IndexPath(item: i, section: indexPath.section)) as? WemoDeviceCellView {
|
||||
let animOptions = UIViewAnimationOptions([.allowUserInteraction])
|
||||
let animOptions = UIView.AnimationOptions([.allowUserInteraction])
|
||||
|
||||
UIView.animate(withDuration: 0.3, delay: currentDelay, options: animOptions, animations: {
|
||||
cell.toggled = (tappedActionCell == .allOn)
|
||||
|
||||
@@ -179,7 +179,7 @@ class VisualizationViewController: UIViewController
|
||||
|
||||
internal func _setupModel()
|
||||
{
|
||||
_cubletsNode.enumerateChildNodes { $0.0.removeFromParentNode() }
|
||||
_cubletsNode.enumerateChildNodes { (child, _) in child.removeFromParentNode() }
|
||||
_cublets.removeAll()
|
||||
|
||||
let sz = Float(VisualizationViewController.cubletsSize)
|
||||
|
||||
Reference in New Issue
Block a user