Basic SwiftUI concepts and terms for view creation and state management

A macro shot of the Notes app icon on an iPhone
A macro shot of the Notes app icon on an iPhone
Photo by Brett Jordan on Unsplash

It was really exciting to hear about Apple’s new framework called SwiftUI at WWDC 2019. This article is a quick guide to get started with SwiftUI.

At first, we’ll take a look at how views in SwiftUI are created, laid out, and presented. Then, we’ll examine how the state is being managed with SwiftUI. And finally, we’ll take a look at how SwiftUI and UIKit play together.

A picture of a delightfully happy white dog moseying through the woods.
A picture of a delightfully happy white dog moseying through the woods.
This world is so exciting!

Views in SwiftUI

With UIKit, we had different ways to build user interfaces. Many discussions were held about whether to build UIs programmatically or by using Interface Builder. …


Check your knowledge on architecture and design patterns in Swift iOS

I recently got into the position of leading the technical interviews when my client was searching for a new senior iOS developer.

It’s a challenging task to evaluate the skills and knowledge of another developer. In this post, I share my results of the most useful iOS and Swift questions and answers with you. I categorised the questions into different topics:

  1. Swift Programming Language (covered in part 1)
  2. Networking (covered in part 2)
  3. Persistence & Databases (covered in part 3)
  4. Concurrency (covered in part 4)
  5. Architecture & Design Patterns (covered in this post)
  6. Testing (coming soon)
  7. Continuous Integration (coming soon)

The purpose of these interview questions is to get to know the developers knowledge on architecture and design patterns with a focus on iOS development. …


Learn how to localize plurals for multiple languages in iOS by using the Localizable.stringsdict file

If you are already familiar with localizing plurals in iOS and you are just looking to remember the specifics, the cheat sheet below will help you out.

If you are new to this, skip the cheat sheet for now and read the basics below.

Cheat sheet

Image for post
Image for post

Basics

Every time you want to localize texts like My dog ate 2 carrots where the carrot count is dynamic, one localization string will not be enough. For example, localizing with My dog ate %i carrots would produce My dog ate 1 carrots when passing in 1.

The first solution that may come to your mind could be to create another localization string for one carrot and adding some logic to your code…

About

Natascha Fadeeva

Writing articles about iOS and Swift programming.

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