5 ms·
OP brings some great points (I've had a lot of trouble with an inherited code-based UI in Swift), but I was dying to see code examples of the 'correct way' to u
by phreack 9y ago
OP brings some great points (I've had a lot of trouble with an inherited code-based UI in Swift), but I was dying to see code examples of the 'correct way' to use UIKit and its patterns, particularly Dependency Injection, as I've yet to find a solution that I'm comfortable with. Can anyone link a good example?
- designcode 9y agoI have the opposite opinion. Storyboards / xibs are complete evil. Crash Xcode all the time, dont work well with version control / multiple people editing, hard to refactor.. list goes on. Code makes things very simple and reusable when it comes to UI in iOS.
- MPiccinato 9y agoI don't have a link to a good example but I have used https://github.com/Swinject/Swinject https://github.com/Swinject/Swinject in the past and it really helps get the job done. You can over do it a bit though as with anything.
- ryansobol 9y agohttp://aplus.rs/2017/highly-maintainable-app-architecture/ http://aplus.rs/2017/highly-maintainable-app-architecture/
- mephitix 9y agoDependency injection is surprisingly easy with Swift since you can implement it with protocol extensions. You don't need a framework or anything: http://www.danielhall.io/a-swift-y-approach-to-dependency-injection http://www.danielhall.io/a-swift-y-approach-to-dependency-in...