The preferred way to design a viewcontroller is using storyboard and use autolayout. To help to set up the layouts properly and at the same time visible check the result open more device layouts in preview mode – it is the best moving it to a separate window. Here are the steps: Open the storyboard […]
Category: Quick reference
Blocks in Objective-C
Blocks in Objective-C Quick overview Blocks are the closure pattern implementation in Objective-C. Blocks are objects containing code like a method but blocks are standalone objects (not belonging to a specific class/instance) encapsulating and capturing the code and variables enclosed in the beginning and closing brackets. You declare a block type or variable this way: returnType […]
Navigating back and forth among Viewcontrollers in Storyboard
In the old days if you wanted to present a ViewController you should call presentModal.. or push… in the code. The problem with this approach is that if you want to modify the presentation you should change the code. To separate this Apple found out the Storyboard – all your ViewControllers in one place. Visually representing the […]
Coding Guidelines
General The main reason of this document is to help to achieve a clean code, which is: Readable: easily understandable – by other developers Maintainable: easily changeable by other developers as well Flexible: can be extended and add new functionality Testable: can be unit testable – where other classes are mocked even if the classes […]
Design Patterns and Principles
Introduction This article is a cheat sheet of the most used design patterns and principles. This was not made to teach you. This was made to make you remember what you already understood. Basic definitions Several design patterns based on the following Wrapper Hold a reference to another object. Sometimes it means the owner manages […]