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…
All posts filed under “Closure”
#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…
#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…
#7 Do I love or crash something? – shortly on capture lists
I love pizza… or pasta… or it just crashes… Some time ago I have attended an iOS meetup in Poznań, on which the attendants were given a short quiz during a break. We had to answer what would be printed in the console after code execution. One of the code snippets looked similarly to this one: I have answered that…