GitHawkApp / GitHawk

The (second) best iOS app for GitHub.
http://githawk.com
MIT License
2.88k stars 383 forks source link

Code structure: Adopt swift best-practices #2790

Open flowinho opened 5 years ago

flowinho commented 5 years ago

Hello their contributors!

I've been looking into the code and saw that GitHawk suffers a bit from the MassiveViewController syndrom that many applications do.

If you e.g. have a look at Settings you'll notice that the ViewController declaration itself adopts several protocols. While is perfectly fine it creates some problems:

I suggest to move the protocol adoption at least into extension declarations to keep the code more readable and have the Swift compiler detect unnecessary stored variables.

e.g. https://medium.com/swift2go/i-swift-part-1-organize-uiviewcontroller-classes-by-using-extensions-63957e517c65

For more information please have a look at:

Best wishes from southern germany.

RuthSoledadPlaza12 commented 5 years ago

Nice

Sent with GitHawk