The current implementation produces a large amount of code by just setting some AutoLayout Contraint (e.g https://github.com/corona-warn-app/cwa-app-ios/blob/05bd329bd79de50b4d6a7f59c72f741f70a88b3b/src/xcode/ENA/ENA/Source/Scenes/ExposureSubmission/ExposureSubmissionNavigationController.swift#L258-L305)
The use of SnapKit to set the constraints.
SnapKit will make the work with constraints much easier and will lead to a heavily reduced codesize. And as we all know, less code == less bugs. On the other side there could be some internal policies to reduce the number of used dependencies as much as possible, which would be totally acceptable.
Hi there,
Thanks for your suggestion.
UI code refactoring, especially, (storyboard -> code) will be discussed after the app released. I put it on hold.
_storyboard -> code_ is generally a good idea and sounds awesome!
_storyboard -> code_ is generally a good idea and sounds awesome!
Cool! Thanks. cc @ChristianKienle
Why did you use storyboards at the beginning anyway
I would suggest to remove all Storyboards as soon as possible (and would love to help do this). Storyboards make projects way harder to test.
But I would stick to pure Auto Layout to reduce the amount of 3rd party code as much as possible. Auto Layout is easy and the anchor based API is easy to read and works with. In case abstractions are needed, I would implement them in the code without the use of a 3rd party lib.
I鈥榙 agree with @dasdom in terms of not introducing another dependency for using Autolayout.
Those APIs are much better these days and for the sake of reusability a few extensions should be enough.
Hi guys,
Thanks for your discussions. We have our plan to rewrite UI code once we release our app.
After some internal discussion, we won't use any 3rd party lib to do it. Because the Autolayout API is much more better than first version. Please stay tuned, once we start our plan, we will let the community to know it. Thank you very much. cc @ChristianKienle
Most helpful comment
I would suggest to remove all Storyboards as soon as possible (and would love to help do this). Storyboards make projects way harder to test.
But I would stick to pure Auto Layout to reduce the amount of 3rd party code as much as possible. Auto Layout is easy and the anchor based API is easy to read and works with. In case abstractions are needed, I would implement them in the code without the use of a 3rd party lib.