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

Modernized code #44

Closed
wants to merge 12 commits into from
Closed

Conversation

jkereako
Copy link

The main idea of this pull request is to bring the code up to modern Objective-C standards.

Refactored code

  • instancetype replaced the return type id in init methods.
  • The property qualifier strong was removed because all properties are strong by default
  • The property qualifier assign was removed because it no longer has purpose
  • The property qualifier unsafe_unretained was replaced with weak
  • Used dot-syntax wherever possible
  • Added method prototypes to aid the static analyzer
  • Removed un-implemented delegate methods

I turned on all warnings for XCode and enabled "treat warnings like errors" and compiled the project successfully.

Changed coding style

Originally, I was not going to submit a pull request so I went ahead and changed the coding style. But I figured what the hell and submitted a request anyway.

@sibljon
Copy link
Contributor

sibljon commented Feb 25, 2015

Hi @jkereako,

Thanks for taking the time and effort to do a Pull Request.

I'll be looking into this when time permits; however, a couple thoughts in the meantime:

  • I see the value in following a published Obj-C style guide, such as the one you mentioned.
  • I'm not sure how this will fit in with the 2.0 development branch that's currently open.

@jkereako
Copy link
Author

jkereako commented Mar 4, 2015

@sibljon :
Thanks for the reply. As for your concern:

I'm not sure how this will fit in with the 2.0 development branch that's currently open.

I had this in mind before I submitted the pull request:

The intention of this 2.0 release is to right the course, making this library both quicker to understand and easier to use... such as bug fixes, updates to support new iOS SDKs, and refactoring

The changes I made are in line with the NYT Objective-C style guide and the document Adopting Modern Objective-C.

Both documents encourage brevity and clarity, (i.e. omitting @synthesize for readwrite properties and always use brackets in if statements, even one-liners).

@jkereako
Copy link
Author

jkereako commented Mar 7, 2016

Closing!

I submitted this pull request over 1 year ago and there has not been any movement on this or the project in general.

Since I created this pull request, I learned Swift ported this library to Swift. Check out AutocompleteTextField.

@jkereako jkereako closed this Mar 7, 2016
@sibljon
Copy link
Contributor

sibljon commented Mar 7, 2016

👍

This pull request was closed.
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