Some years ago before I became a Jr. iOS developer, some company asked me in an interview the following question: "If you have a view controller that presents another, how can I make this second view controller to update some data within the previous one?". I spent some minutes to achieve my answer and I didn't know how to explain that, because for me only the first screen could send some data to the other and it would no more belong to the next screen's context. Fortunately, 2 years passed since that interview and now I can teach you 4…

Image from

Most developers ask frequently why so many times the weak keyword is used before some variable declarations such as delegates, outlets and other optionals. There is also this unowned keyword which is used with reference types that are not optionals. There is one single concept in Swift that solves this puzzle called ARC

ARC: Checking your pointers existence

ARC stands for Automatic Reference Counting and is one of the most important mechanisms in the Swift Language made to prevent memory leaks. ARC has a counter for each reference to a memory address and every time you declare a new variable referencing some address, this address's…

Image from

In any professional area in society, testing your achieved work is one of the most important tasks. It's the final proof that your product or service really works as everyone expect and you are ready to offer it to your clients or users. If you don't test your results, you shall face a lot of consequences, from not satisfied users to lost lives in an accident. So, you really must worry with it.

In this article, we will talk about unit tests in a simple iOS project considering a layer-based architecture with 3 classes communicating with each other through delegation…

In your life of a developer, you certainly have already dealt(or at least tried to deal) with the so famous Cocoapods. Cocoapods are the most used dependencies manager, which you can use to import a lot of third party features from other developers or even companies. For who just use that for enjoying other people's work, it is just a piece of cake, since you just need to edit a Podfile and know which frameworks and versions you shall get. After that, you tap pod install in your terminal and ta dá! Everything you need is up to use.


image from

As a developer, you may be used to dealing with asynchronous tasks all the time: handling UI events as tapped buttons, downloading web content, communicating with external devices, etc. There are a lot of ways to keep parallel tasks, like Notification Center, didSet observables, delegation, IBActions or closures. Although, using all this features usually gives you a lot of work and there is no guarantee that your code will be executed in the desired order.

RxSwift came as a reactive solution for dealing with all those asynchronous tasks and inherited from a .NET solution called Rx. It allows you to…

image from

In WWDC2019, Apple gifted us with a brand new Apple Pencil framework: the PencilKit. Before that, it was very hard and complex to build a Pencil app only by detecting touching gestures and making Math calculations, but with this new library, it costs only a few lines of code to present a drawing canvas with a simple tool picker.

First, let's start describing the magic around the Pencil Kit by giving a brief introduction of the basic concepts around implementing a drawing app:



As an iOS developer, it is very common to face situations where you must deal with collections to display multiple content widgets in the same screen. I'm talking about tableviews and collection views. They are very useful to handle different contents that should be displayed as a list or a some kind of grid UI structure.

Apple really did a fantastic way to feed tableviews(and collection views) by giving us the power to define exactly which item should be filled in a given row and section, how many items does the table have, which height by each cell, how should…

As iOS devices become more popular nowadays, we have to deal each time even more with features to include more groups of people who cannot deal with apps the same way as us. Something I consider one of the most important elements of an app is its capability to be usable by any kind of user. …

Como todos nós do universo da maçã sabemos, Apple anunciou de surpresa um desafio para estudantes de todo o mundo comemorando essa nova edição virtual da WWDC que assistiremos de casa esse ano por causa do Covid-19. Nem eu mesmo imaginava que a Apple manteria um “Scholarship” esse ano sem poder presentear os alunos com um ingresso gratuito do evento e demais outros grandes presentes aos 350 selecionados.

Pra quem não sabe, Apple todo ano levanta um desafio a ser implementado em Swift a todos os alunos do mundo aspirantes a desenvolvedores iOS, cujo objetivo na maioria das vezes é…

Image from

Every new developer who starts learning iOS always see Xcode one of the most beautiful frameworks due to the fact that the first thing you face when creating a new project is that wonderful file called main.Storyboard, which allows you to build all your interface and screen flow in a totally intuitive way. …

Pedro Alvarez

iOS developer- WWDC19 scholarship winner- Blockchain enthusiast

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store