Photo by Karine Avetisyan on Unsplash

When building out your application in Swift, a lot of developers may encounter runtime errors when building their application. A very common cause for runtime errors is that the value that is being requested is nil. This means that the application is requesting a value that does not exist. The compiler doesn’t know how to handle this case and therefore creates a runtime error, crashing your application.

There is an easy way to avoid this runtime error by utilizing optional chaining. …


Photo by Adi Goldstein on Unsplash

Most iOS developers have been tuning in to WWDC this week to catch all the latest updates and features being made available from Apple. Today we are going to do a run down on some of the awesome new features that are coming to SwiftUI 3.0 and what they do.

Refreshable

SwiftUI 3.0 brings the refreshable() modifier to developers. This modifier allows you to attach functionality to a List object in SwiftUI that occurs when the user drags the screen down far enough to trigger a refresh. We can take an example of the implementation of this modifier below:

struct…

Photo by Alex Bachor on Unsplash

As an iOS developer, you have likely already encountered protocols in either projects you have made, or other projects you have looked at. But why do developers use protocols? What exactly do they do and why are they useful? Today we are going to dive into protocols and learn how to use them in your next Swift project!

Protocols are used to create a core structure for an object in Swift. This structure is similar to that of a class, but one of the main differences is that you only define what functions are associated with a protocol, not the…


Photo by Kyle Hanson on Unsplash

When building out your first applications in Swift UI, you are going to quickly encounter the need to utilize buttons in order to achieve different functionality within your program.

When creating a button, it can be a bit daunting to remember the syntax needed and how to format it appropriately as it is quite different than creating actions within UIKit. Today we are going to cover the syntax and application usage for buttons within Swift UI so that you will be prepared to take your application to the next level.

Button Syntax

The syntax for creating a button within your…


Photo by Patrick Ward on Unsplash

With WWDC 2021 on the horizon, it is important to know some things to be on the lookout for that may be being announced this year! Like previous years, WWDC is a conference held by Apple for their developers to showcase the new technologies and hardware that they get a first glimpse of to start working on development by the time of release. Like last year, WWDC this year will be hosted virtually! Thats right, no need to pay for the lottery ticket system in hopes that you can go to the Apple campus for it. …


Photo by fabio on Unsplash

When working with Swift UI, you are likely going to need to pass some data in between your views that may be being stored or used within another view. This process can actually be achieved pretty easily by passing the data through a closure statement with calling the next view. We are going to dive into this subject today so that you are able to easily pass data from one view to the next!

Closure Statements:

When passing data through closure statements, it is important that the view receiving the data is setup to actually utilize that data and accept…


Photo by Jeroen den Otter on Unsplash

When constructing your UI, more often than not you will want to need to stylize your Text objects in order to achieve the look you are going for within your application. Swift UI makes stylizing your fonts extremely easy! We will cover some of the different modifications you can easily use to create beautiful looking Text objects within your Swift UI application!

Font Types:

One of the first things that you may want to do when styling your fonts in Swift UI is to choose the type of font that you want. …


Photo by Jamie Street on Unsplash

Today we are going to cover an important process in developing applications with Swift UI, how to navigate between views. When developing applications using UIKit, developers typically utilized segues to navigate between views. In Swift UI, we use a different method of navigation called Navigation Links.

Getting Started with Navigation Links:

The first thing that you will need to do to use navigation links is to wrap your view in a navigation view. You can do so by using the syntax in the following example:

struct SomeView: View {
var body: some View {
NavigationView {
Text("Hello.")
}
}
}


Photo by Anthony Choren on Unsplash

During my time at Apple, one of the biggest areas of confusion that I saw was developers trying to choose the correct method for distributing their app. Apple offers many different ways to distribute applications and each one has a specific purpose. Today we are going to dive into the different methods of distribution and when to use each one depending on your distribution needs.

App Store Distribution:

The first type of distribution we will cover today is the most common type of distribution, App Store Distribution. To distribute an app on the App Store, you or your organization must…


Photo by Cookie the Pom on Unsplash

Hello again! Today’s article is going to focus on spacers and padding within Swift UI. When you begin designing your user interface with Swift UI, you will notice that a lot of the elements you add are automatically being placed on the screen based on the type of stack you have created it within. Well what happens if you want to manually adjust the spacing between objects to achieve a desired look? This is where spacers and padding come into play. Today, we will talk about both options and when to use each one of them for your UI design.

Austin Beck

var title = “iOS Engineer @ Lunchbox”

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