Swift

Showing 1-9 of 14 results
EngineeringIcon ChevronMobile

How to Approach Wrappers for Swift Properties

By Aleksandr Gaidukov

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
EngineeringIcon ChevronTechnology

Object Detection Using OpenCV and Swift

By Josip Bernat

Swift is great, but what if your application relies on a library that’s written using C++? Luckily Objective-C++ is here to save the day. In this article, Toptal Freelance Swift Developer Josip Bernat integrates C++ code with Swift by using wrapper classes as a bridge and then creates an app that recognizes the Toptal logo using OpenCV.

5 minute readContinue Reading
EngineeringIcon ChevronTechnology

Advanced Concurrency in Swift with HoneyBee

By Alex Lynch

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
EngineeringIcon ChevronMobile

Working With Static Patterns: A Swift MVVM Tutorial

By Lucas van Dongen

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
EngineeringIcon ChevronBack-end

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

By Alexey Karasev

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
EngineeringIcon ChevronMobile

iOS ARKit Tutorial: Drawing in the Air with Bare Fingers

By Osama AbdelKarim AboulHassan

With augmented reality on the rise, more and more libraries and tools are developed to tap into that market. Apple recently released ARKit, which shows great promise through power and simplicity of use.

13 minute readContinue Reading
EngineeringIcon ChevronMobile

A Guide to CloudKit: How to Sync User Data Across iOS Devices

By Paul Young

Modern mobile application development requires a well thought-out plan for keeping user data in sync across various devices. This is a thorny problem with many gotchas and pitfalls, but users expect the feature and expect it to work well. For iOS and macOS, Apple provides a robust toolkit, called CloudKit API, which allows developers targeting Apple platforms to solve this synchronization problem. In this article, Toptal Software Engineer Paul Young demonstrate how to use CloudKit to keep a user’s data in sync between multiple clients.

21 minute readContinue Reading
EngineeringIcon ChevronMobile

Swift Tutorial: An Introduction to the MVVM Design Pattern

By Dino Bartošak

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
EngineeringIcon ChevronBack-end

An Introduction to Protocol-oriented Programming in Swift

By Aleksandr Gaidukov

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

Join the Toptal® community.