Nikolay Blokhin Facebook Nikolay Blokhin Photos Nikolay Blokhin Linkedin Nikolay Blokhin Twitter

Hi, I'm Nikolay Blokhin

Swift articles

My collection of the best articles about Swift :)
All the articles I'm selecting manually and publish updates every day.

2017 August

2017.08.12

Swift 4 is the latest major release from Apple scheduled to be out of beta in the fall of 2017 and swift-4.0-branch is available to download at https://swift.org/download/#snapshots.

Apple announced Swift 4 as part of Xcode 9. Xcode 9 simultaneously supports both Swift 4 as well as an intermediate version of Swift 3 in Swift 3.2. You can download the latest version of Xcode 9 from Apple’s developer portal (you must have an active developer account).

So lets start...

to read it →
2017.08.11

To encrypt/decrypt a string in iOS using external public/private keys in PEM file format is not easy. I have spent several days on this topic. Finally I found that Swift-RSAUtils is a useful tool. Based on the RSAUtils.swift file in it, I have worked out my solution with the following steps...

to read it →
2017.08.10

Using third party libraries is not uncommon while building any iOS application as it saves time and provide a rich user experience.

At Modeso, we do more than just mobile applications — we experiment with new technologies & devices. That’s why we have started our open-source contributions to build strong, rich user experience libraries.

to read it →
2017.08.10

It has been a little more than three years since Swift rolled out as a general-purpose, multi-paradigm programming language meant to develop OS and apps for Apple devices. It is a compiled programming language, and is slowly gaining more popularity than Objective C, one of the languages it is influenced by.

Let us dive into the reasons why you should use Swift instead of Objective C

to read it →
2017.08.09

A lot of my writing about code involves the smaller aspects of building an app. Things like cool frameworks, idiomatic Swifty things. Not a mention of the overall way to structure a project. Today, that changes.

to read it →
2017.08.09

Swift is heavily influenced by different programming paradigms from functional, imperative and object-oriented programming. This allows you as a developer to write very powerful and flexible code.

Protocol oriented programming in Swift helps you to bypass problems of object oriented-programming surrounding inheritance and their undesired complexity. But protocols still struggle with some compiler limitations when it comes to the usage of generic types. Type erasure is a pattern that can help us to bypass these limitations.

to read it →
2017.08.09

After declaring the views of an app you usually need some customisation. Most of the times, that customisation needs to be done only once. That code goes typically in the viewDidLoad function...

to read it →
2017.08.09

A linked list contains ordered items, where each item is a node. There are single linked lists, where each node only has a reference to the next node. Then there is the doubly linked list, where each node references the previous node and the next node. The head node is the first node in your linked list, whereas the tail is the last node.

to read it →
2017.08.08

So what is ‘Bastard Injection’ and why is it bad?

I’ll try to stay out of the weeds but I can’t really answer this without quickly defining Inversion of Control and Dependency Injection.

to read it →
2017.08.08

Reference counting is great in taking unused objects out of memory. The same can be applied to temporary files we allocate.

Let’s say you are building a video sharing app, here is what you have to do each time user decides to upload some content from the app...

to read it →
2017.08.08

Understanding how UITableViews (and UICollectionViews) works as an iOS developer is like understanding how salt and pepper works as a cook. They’re in the majority of the popular apps, and despite being relatively simple to use, we can get really intricate with their implementation.

Implementing a simple UITableView can be really simple, thanks to the use of protocols in the UIKit. The primary protocols that we need to hook up our data to our UITableVIew are: UITableViewDataSource, and UITableViewDelegate. But what does that mean that our ViewController conforms to these protocols? (And why are they named delegates?)

to read it →
2017.08.01

The prototype pattern is used to instantiate a new object by copying all of the properties of an existing object, creating an independent clone. This practise is particularly useful when the construction of a new object is inefficient.

Imagine, we have a SmartPhone class as bellow...

to read it →
2017.08.01

Server side Swift is super snappy, the performance is incredible, and the memory footprint is tiny.

Vapor 2 was a delightful surprise that it feels very Laravel-ish regarding structure.

Swift in its nature of being strictly type hinted (and the Internet is very ”stringy”) makes some operations like models to have a lot of boiler plate. Vapor tries to overcome this with its Node package.

to read it →