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

Class properties #1400

Merged
merged 3 commits into from
Apr 13, 2019
Merged

Conversation

toto
Copy link
Contributor

@toto toto commented Apr 7, 2019

This changes the declaration of class properties in the headers from + (Type)property and + (void)setProperty:(Type)value; to the more modern @property (class) Type property where appropriate.

This has the main advantage of allowing the Swift compiler to differentiate between a property and a method, removing errors like foo.bar instead of foo.bar() in Swift.

This should not affect ObjC behaviour in any way.

In the wake of this I renamed some class methods from getFoo to foo to keep in line with property naming. The old names are now marked as deprecated.

@TomWFox TomWFox requested a review from mrmarcsmith April 12, 2019 15:21
Copy link

@mrmarcsmith mrmarcsmith left a comment

Choose a reason for hiding this comment

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

Thanks! You’re on fire today!

@TomWFox TomWFox merged commit b4f8674 into parse-community:master Apr 13, 2019
@TomWFox
Copy link
Contributor

TomWFox commented Apr 13, 2019

@toto If you happen to be interested in being a maintainer of this repo I think it would be very welcome as you have made some great contributions!

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.

3 participants