Code review comments#1
Open
normand1 wants to merge 1 commit into
Open
Conversation
normand1
commented
Sep 20, 2019
| @@ -0,0 +1,14 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
Author
There was a problem hiding this comment.
Ignore this, I was too lazy to remove the change, sorry!
normand1
commented
Sep 20, 2019
| 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.
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
normand1
commented
Sep 20, 2019
| 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.
This does the same thing in 1 line... very minor improvement if any
normand1
commented
Sep 20, 2019
| 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.
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hope it's not too late, sorry it took a bit to get to. I did some of the review on the bus so I just added comments directly into the code instead of as a Github comment because I didn't have internet at the time :D