diff --git a/HueBoo.xcodeproj/project.xcworkspace/xcuserdata/davidnorman.xcuserdatad/UserInterfaceState.xcuserstate b/HueBoo.xcodeproj/project.xcworkspace/xcuserdata/davidnorman.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..76070b4 Binary files /dev/null and b/HueBoo.xcodeproj/project.xcworkspace/xcuserdata/davidnorman.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/HueBoo.xcodeproj/xcuserdata/davidnorman.xcuserdatad/xcschemes/xcschememanagement.plist b/HueBoo.xcodeproj/xcuserdata/davidnorman.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..326c7b1 --- /dev/null +++ b/HueBoo.xcodeproj/xcuserdata/davidnorman.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + HueBoo.xcscheme_^#shared#^_ + + orderHint + 0 + + + + diff --git a/HueBoo/Models/ColorSet.swift b/HueBoo/Models/ColorSet.swift index e2805c7..9e6b09b 100644 --- a/HueBoo/Models/ColorSet.swift +++ b/HueBoo/Models/ColorSet.swift @@ -16,15 +16,10 @@ struct ColorSet: Equatable { let alpha: CGFloat init(initialColor: UIColor) { - var hue: CGFloat = 0 - var saturation: CGFloat = 0 - var brightness: CGFloat = 0 - var alpha: CGFloat = 1 + var hue, saturation, brightness, alpha: CGFloat + (hue, saturation, brightness, alpha) = (0,0,0,0) initialColor.getHue(&hue, saturation: &saturation, brightness: &brightness, alpha: &alpha) - self.hue = hue - self.saturation = saturation - self.brightness = brightness - self.alpha = alpha + self.init(hue: hue, saturation: saturation, brightness: brightness, alpha: alpha) } init(hue: CGFloat, saturation: CGFloat, brightness: CGFloat, alpha: CGFloat = 1) { diff --git a/HueBoo/RootViewController.swift b/HueBoo/RootViewController.swift index 891841d..5fc474c 100644 --- a/HueBoo/RootViewController.swift +++ b/HueBoo/RootViewController.swift @@ -60,7 +60,7 @@ class RootViewController: UIViewController, RootPresentable, RootCollectionViewL if Constants.getTextColor(from: color) == .white { statusBarStyle = .lightContent } else { - statusBarStyle = .default + statusBarStyle = .default // I'm not 100% sure this is doing what you expect it to do. This seems to hide the status bar content so while I'm swiping through the status bar appears to be flashing on and off. } UIView.animate(withDuration: 0.3) { @@ -71,13 +71,13 @@ class RootViewController: UIViewController, RootPresentable, RootCollectionViewL private func setupViews() { collectionView.listener = self - collectionView.backgroundColor = .red + collectionView.backgroundColor = .red // when I swipe back on the first cell I can see this. Might be better to use black as a default? view.addSubview(collectionView) NSLayoutConstraint.activate([ - collectionView.topAnchor.constraint(equalTo: view.topAnchor), - collectionView.bottomAnchor.constraint(equalTo: view.bottomAnchor), + collectionView.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor), + collectionView.bottomAnchor.constraint(equalTo: view.safeAreaLayoutGuide.bottomAnchor), collectionView.leftAnchor.constraint(equalTo: view.safeAreaLayoutGuide.leftAnchor), collectionView.rightAnchor.constraint(equalTo: view.safeAreaLayoutGuide.rightAnchor) ]) diff --git a/HueBooTests/RootInteractorTests.swift b/HueBooTests/RootInteractorTests.swift index 144a364..dfb6513 100644 --- a/HueBooTests/RootInteractorTests.swift +++ b/HueBooTests/RootInteractorTests.swift @@ -1,4 +1,4 @@ -// + // // RootInteractorTests.swift // HueBooTests //