All posts filed under “Closure

comment 0

#49 The Builder Pattern

In issue #41 in which we have built an app that uses a photo camera to capture one’s loayalty cards we used a pattern that we named Builder to configure properties of objects. How does the code look like when we use Builder pattern? We simply initialize an object we want to configure and call the with(:) function on the…

comment 0

#30 Cyclomaticly Complex Settings View Controller

Simple screens evolve In every project simple screens can happen. Let’s think for example of a simple Settings screen. Customer wanted a Settings screen on which a user would be able to Set Option 1 and 2 and to Logout from the application. It seemed so simple so developers used a UITableView with 1 section, hard-coded text displayed in cell…

comment 1

#29 An alternative to if let and guard let

It’s brilliant when you can work with people smarter (or even a lot smarter) than you! You can learn so much from them. And then write about the things you’ve learned 🙃. if and guard let Have you ever been tired of repeating if let or guard let statements, to perform certain operations, that should be performed only if a…