Structure your UITableView better with structs and enums in Swift

In this post, I present a technique I use a lot when building a UITableViewController in Swift, but which I haven't seen used by many other people very often.


This technique was inspired by this years's edition of the legendary Stanford CS193p on iTunes U (presented by the just as legendary Paul Hegarty) : iTunes U - Developing iOS 8 apps with Swift, and by this M2M site which for years now has specialized on giving unofficial solutions to the assignments (I suppose that Stanford students have a chance of having their work corrected, but there is no "official" solution to the assignments for the iTunes U followers). In this course, the 4th assignment dealt specifically with table views. Namely, one of the requirements was:
While you might be tempted to deal with this with large if-then or switch statements in your UITableViewDataSource and navigation methods, a cleaner approach would

Tagged , , Read More

ZEN BabyBook: política de privacidade

Nossa política de privacidade é simples: nós não recolhemos quaisquer dados sobre os usuários deste aplicativo. Este aplicativo foi desenvolvido inicialmente para permitir que nossos filhos pudessem aprender outras línguas. Nós pensamos que as crianças devem aprender em um ambiente seguro, sem que ninguém tire vantagem disso. Esperamos sinceramente que este aplicativo permita que você e seus filhos se divertam enquanto aprendem!

Tagged , , , , , Read More