Skip to content
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

Allows getting the hue, saturation and brightness components of UIColor. #51

Merged
merged 2 commits into from
Jan 23, 2018

Conversation

boherna
Copy link
Contributor

@boherna boherna commented Jan 22, 2018

No description provided.

@@ -173,6 +173,30 @@ public extension UIColor {
return a
}
}

var hueComponent : CGFloat {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you remove the space before the : to match our convention?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's funny because I never leave that space but left it following the coding convention on the same extension you used for redComponent.

@@ -173,6 +173,30 @@ public extension UIColor {
return a
}
}

var hueComponent : CGFloat {
get {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is computed property, I don't think you need get here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same as before, I know you don't need the get, but left it following the coding convention on the same extension you used for redComponent.

}
}

var saturationComponent : CGFloat {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you use 2 spaces indentation?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think my Xcode defaults to 4 spaces indentation. I'll check.

@onmyway133
Copy link
Collaborator

@boherna Hi, many thanks for the PR. I made some comments

@boherna
Copy link
Contributor Author

boherna commented Jan 22, 2018

How does it look now? As a bonus I fixed also the redComponent, greenComponent and blueComponent to follow the requested coding style.

@onmyway133
Copy link
Collaborator

@boherna Looking good to me. Thanks again for the PR 🚀

@onmyway133 onmyway133 merged commit ff2262b into zenangst:master Jan 23, 2018
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.

2 participants