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

Beginning of a version 2? #16

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

borgeser
Copy link

@borgeser borgeser commented Jan 3, 2018

Hi Joe,

I really like your work and I'd like to contribute to this library 👍

I see two axes of improvements for this project: code cleaning and new features.

For new features, it would be nice to be able to use the ScratchView from a xib or a storyboard (issue #6).
It would also be nice to be able to fetch the image easily (issue #4).
It would also be great to be able to dynamically change the width/height of the view.

For code cleaning, I suggest:

  • fixing typos
  • removing commented code
  • replacing explicit unwrapping (!) by optional (?) or non-optional (no modifier)
  • better encapsulation
  • less instance variables
  • make the code Swiftier: if self.delegate != nil { self.delegate.began(self) } -> delegate?.began(self) for instance

Maybe we could also work on architecture. I think the class ScratchUIView is useless today, it's just a proxy for a delegate.
I think a good class ScratchView, with a nice set of features, can do all the work.

Here you have two commits to show you what I can do.
The changes are not backward compatible so I don't expect them to be merged as it.
But it could be a start for a version 2.

Tell me what you think about it, we can discuss somewhere else if you want.

Regards,

Roland.

Roland Borgese added 2 commits January 3, 2018 10:18
@borgeser borgeser changed the title Code cleaning Beginning of a version 2? Jan 3, 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.

1 participant