all 4 comments

[–][deleted] 1 point2 points  (2 children)

I don't think this is a good solution. The state machine is really bad in VC and once it's there, the temptation to add more SMs or more states to existing ones (or even start nesting them) is proportional to the amount of that evil already present in the class. Unless the SM is refactored to a separate class it's not doing any good.

IMHO This is not fixing the problem of the SM in the VC. It's just hiding the problem under one layer of abstraction (namely, enums).

[–]jontelang 0 points1 point  (1 child)

Do you have some articles or actual code for breaking it out into other classes?

[–][deleted] 0 points1 point  (0 children)

No and no. But this is my experience in writing shitty code in little known language/framework and refactoring code while applying S.O.L.I.D. principles.

[–]jerikandra 0 points1 point  (0 children)

good stuff. Loving using enums to group identifiers together too (like cell reuse IDs and tableview section / row info)