Swift

Showing 1-9 of 11 results

Share

How to Approach Wrappers for Swift Properties

A property wrapper is a generic structure that encapsulates read and write access to the property and adds additional behavior to it. We use it if we need to constrain the available property values, add extra logic to the read/write access (like using databases or user defaults), or add some additional methods.

In this article, Toptal Freelance iOS Developer Alexander Gaidukov demonstrates Swift 5.1’s new @propertyWrapper annotation—a more elegant solution.

7 minute readContinue Reading
Aleksandr Gaidukov

Aleksandr Gaidukov

Advanced Concurrency in Swift with HoneyBee

Handling concurrency in Swift can cause headaches and pyramids of doom. HoneyBee is a futures/promises library that makes concurrent programming easy, expressive, and safe.

Join Toptal Swift Developer Alex Lynch in exploring the performance and readability advantage of using this library.

13 minute readContinue Reading
Alex Lynch

Alex Lynch

RxSwift and Animations in iOS

iOS developers love the power of UIKit, and animating a UIView is usually fairly easy. However, if you want to chain animations together and set up dependencies between them, your code can quickly become difficult to read with many nested closures and indentation levels.

In this article, I’ll explore how to apply the power of a reactive framework such as RxSwift to make that code look much cleaner as well as easier to read and follow. My client wanted a story told through a sequence of animations rather than by playing a pre-rendered video, and with RxSwift, we easily tweaked it to perfection.

8 minute readContinue Reading
Vadim Dagman

Vadim Dagman

Working With Static Patterns: A Swift MVVM Tutorial

Real-time data-driven apps create new challenges in the way we structure our programs, especially on mobile. In this article, Toptal Freelance iOS Developer Lucas van Dongen implements an iOS chat app, comparing the classic MVC approach with a static immutable MVVM pattern.

21 minute readContinue Reading
Lucas van Dongen

Lucas van Dongen

Option/Maybe, Either, and Future Monads in JavaScript, Python, Ruby, Swift, and Scala

If you’re searching for the holy grail of bug-free code in JavaScript, Python, Ruby, Swift, and/or Scala, look no further! This monad tutorial by Toptal Freelance Functional Programmer Alexey Karasev takes you from category theory to the practical implementations of the Option/Maybe, Either, and Future monads, plus a sample program—in all five languages.

23 minute readContinue Reading
Alexey Karasev

Alexey Karasev

Swift Tutorial: An Introduction to the MVVM Design Pattern

On every new project, you have the privilege of deciding how you’ll architect the app and organize the code. But if you don’t pay attention, or you rush through coding, you risk ending up with spaghetti code. The solution? Use a proper design pattern.

In this tutorial, Toptal Software Engineer Dino Bartošak explains how to implement an MVVM design pattern on a demo Swift application.

20 minute readContinue Reading
Dino Bartošak

Dino Bartošak

An Introduction to Protocol-oriented Programming in Swift

Most modern programming languages, in the hopes of enhanced maintainability and reusability of code, offer some constructs that help the developer keep the definition of behavior and its implementation separate.

Swift takes the idea of interfaces a step further with protocols. With protocols and protocol extensions, Swift allows developers to enforce elaborate conformity rules without compromising the expressiveness of the language.

In this article, Toptal Software Engineer Alexander Gaidukov explores Swift protocols and how protocol-oriented programming can improve the maintainability and reusability of your code.

9 minute readContinue Reading
Aleksandr Gaidukov

Aleksandr Gaidukov

How to Isolate Client-Server Interaction Logic in iOS Applications

Client-server interactions play a vital role in most modern mobile applications. By leveraging available back-end services, these mobile applications can provide some really amazing functionalities. However, as mobile applications grow complex, it becomes essential to keep the networking module as clean and maintainable as possible - separated from the rest of the application logic.

In this article, Toptal freelance software engineer Alexander Gaidukov walks us through the design of a simple networking module that allows your iOS application to interact with RESTful APIs.

11 minute readContinue Reading
Aleksandr Gaidukov

Aleksandr Gaidukov

The Mistakes Most Swift Developers Don't Know They're Making

Swift is the new programming language created to be a modern replacement for Objective-C in iOS and OS X application development. In general, a skilled Swift developer is usually someone who is already experienced with Objective-C, and that, among other things, might lead them to write Swift code using Objective-C best practices, which can cause some bad mistakes.

In this article, Toptal Freelance Software Engineer Nilson Souto outlines the most common mistakes Swift developers should be aware of.

10 minute readContinue Reading
Nilson Souto

Nilson Souto

World-class articles, delivered weekly.

By entering your email, you are agreeing to our privacy policy.

Join the Toptal® community.