Reflection: Is a form of meta programming that allows you to extract information from data structure in runtime.
Swift’s version of reflection enables us to iterate over, and read the values of, all the stored properties that a type has — whether that’s a struct, a class, or any other type — enabling a sort of meta programming that can enable us to write code that actually interacts with the code itself.
There is a Mirror struct, if you call on an object, it will give you an idea if it is class, struct, enum, tuple. But it does not work on all types for example closures. If it can not tell you what the type is, it will return nil.
There is a child property which has label and values. You can recursively go through the properties of a data structure and be able to sort of go down in a tree and really to figure out everything that is going on.
I have started to create some cool apps(or at least trying to create) for IOS WatchKit recently and noticed that it is way too different than IOS iPhone apps. Here I share Clock – In && Out watch app which records your time and gives you feedback for your time tracker.
Here is skeleton project for our swift projects with mvc, shared folders and some objective C libraries(for UI animations- ProgressHUD etc.)
This project is also base of angela yu’s project!
Alsoo, here is common auto layout issues both programmatically and Main Board Solutions:
If you are interested in not just codding but not repeating your code in any where, I must recoomend ou to read Rob Martin. Uncle Bob, is the man who taught me what OOP really does. Mainly Solid, and not writing the same things n times instead calling the same method or whatever n times, you must read Clean Code. Then, Clean Coder. Tha language is pretty simple for everyone to understand!
you may easily find the book in amazon!
I am mobile software engineer, native Android Developer. But of course, I also love to write swift! This page would be about my daily challenges especially in software.