-
Notifications
You must be signed in to change notification settings - Fork 2
Code review comments #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
| <plist version="1.0"> | ||
| <dict> | ||
| <key>SchemeUserState</key> | ||
| <dict> | ||
| <key>HueBoo.xcscheme_^#shared#^_</key> | ||
| <dict> | ||
| <key>orderHint</key> | ||
| <integer>0</integer> | ||
| </dict> | ||
| </dict> | ||
| </dict> | ||
| </plist> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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) | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You did this in getTextColor() and I thought it was awesome, very "pythonic"! I thought you might be able to use the same pattern here |
||
| 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) | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This does the same thing in 1 line... very minor improvement if any |
||
| } | ||
|
|
||
| init(hue: CGFloat, saturation: CGFloat, brightness: CGFloat, alpha: CGFloat = 1) { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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), | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Seems to me like the safeAreaLayoutGuide would be most applicable to the top and bottom anchors because of the notch, but maybe I'm missing something |
||
| collectionView.bottomAnchor.constraint(equalTo: view.safeAreaLayoutGuide.bottomAnchor), | ||
| collectionView.leftAnchor.constraint(equalTo: view.safeAreaLayoutGuide.leftAnchor), | ||
| collectionView.rightAnchor.constraint(equalTo: view.safeAreaLayoutGuide.rightAnchor) | ||
| ]) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| // | ||
| // | ||
| // RootInteractorTests.swift | ||
| // HueBooTests | ||
| // | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ignore this, I was too lazy to remove the change, sorry!