Skip to content

Code review comments#1

Open
normand1 wants to merge 1 commit into
IamGoodBad:masterfrom
normand1:dave-comments
Open

Code review comments#1
normand1 wants to merge 1 commit into
IamGoodBad:masterfrom
normand1:dave-comments

Conversation

@normand1
Copy link
Copy Markdown

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

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
Copy link
Copy Markdown
Author

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!

var brightness: CGFloat = 0
var alpha: CGFloat = 1
var hue, saturation, brightness, alpha: CGFloat
(hue, saturation, brightness, alpha) = (0,0,0,0)
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The 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

self.saturation = saturation
self.brightness = brightness
self.alpha = alpha
self.init(hue: hue, saturation: saturation, brightness: brightness, alpha: alpha)
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The 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

NSLayoutConstraint.activate([
collectionView.topAnchor.constraint(equalTo: view.topAnchor),
collectionView.bottomAnchor.constraint(equalTo: view.bottomAnchor),
collectionView.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor),
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The 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

WikipediaBrown added a commit that referenced this pull request May 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant