TLDR: What rules ensure you won't have sporadic run-time crashes when using ViewThatFits?
My app crashes - luckily reproducible. But the code appeared syntacticly and logically correct.
Simplified excerpt: https://github.com/alanrick/Experiment3
The crash is caused by ViewThatFits
being overwhelmed by concurrent changes in other views, exacerbated by animation
effects. In the original code the problem was even worse because I'd gone overboard and used ViewThatFits in sub-views making the whole thing too dynamic.
My first rule is:
- Do not use nested ViewThatFits.
But this alone is not sufficient. What other rules can I apply to ensure I won't have hard-to-detect run-time crashes when using ViewThatFits?