Closures in Swift are extremely useful, they are interchangeable with functions and that creates a lot of opportunities for useful use-cases. One thing we have to be careful when using them is to avoid retain cycles.
We have to do it so often that it begs the question:
Writing tests in iOS apps is a touchy subject. Not everyone is so privileged to be able to write tests full-time, for different reasons.
Some people have full control over their development process and choose not to write tests, maybe because they have had a bad experience with it or they just don’t see the value in them.
I would argue that if you are part of a smaller team, tests can even be more helpful than in big corporations.
A big corporation might have dedicated QA team, but if you are one of 2 developers, then you are often responsible for ensuring quality and reliability of your work, its considerable pressure because each feature you write might break something else in your app.
Let us look at practices and tips for writing maintainable tests in your iOS Apps.
Iterating over design that needs to be reflected in code can be tedious and time-consuming.
Typically the designer works in graphics editing software and then submits flat art to the developer who implements the design in code. Refining the design requires going through the same laborious process.
Even harder if we want to support multiple themes in our apps. How would we even approach that if we were using Interface Builder?
Let’s look at how we can approach implementing a simple library that could solve all of the above concerns.