Let’s take a look at how we can implement TipKit in a SwiftUI application. TipKit is used to show contextual tips that highlight new, interesting, or unused features people haven’t discovered on their own yet.
Jan 24, 2025 5 min read Read MoreRecently I was working on a SwiftUI project were I needed to know when my app became active from being in the background. Like most things in SwiftUI, I found out that this was really simple to implement in my project.
Oct 1, 2021 Read PostRecently Apple has announced AsyncImage at WWDC 2021. This makes loading images from a URL very easy in SwiftUI projects supporting iOS 15 and above. Let’s take a look at an example below.
Jun 24, 2021 Read PostRecently I ran into an error when trying to run a SwiftUI Project on my iPhone. I’m running this project on a M1 Macbook Pro. The error seemed to start happening when my project started using certain Cocoapods. The error reads “ARCHS[@]: unbound variable”.
May 18, 2021 Read PostIn this post we are going to look at how we can implement a launch screen in our SwiftUI project. In the past we would usually have to use a storyboard or XIB file to make our launch screens. In SwiftUI, we can now use the Info.plist to make our launch screen.
May 8, 2021 Read PostIn this post we are going to look at how we can add a Swift package to our SwiftUI Project. Let’s start by going to the Swift Package Index website and searching through the libraries. For this post we are going to use the SwiftUICharts package to add to our project.
Mar 24, 2021 Read PostIn this post we are going to make a custom HUD view with a timer. The timer will dismiss our HUD view after about a second. Our HUD view will be similar to the pop up view we see on our screen when we put our phone into silent mode.
Mar 10, 2021 Read PostIn this post we are going to take a look at the different ways we can style a picker view in our SwiftUI project. Let’s first setup a simple picker view like in the example below.
Feb 22, 2021 Read PostWhen you create a new SwiftUI project, you will see that we no longer have the AppDelegate.swift file. This doesn’t mean we don’t need or use the AppDelegate file anymore. If we want to implement something like push notifications we will need to use an AppDelegate in our SwiftUI app. Let’s take a look at how we can add an AppDelegate file to our SwiftUI project.
Feb 15, 2021 Read PostAppstorage is a property wrapper for getting stored values from UserDefaults in SwiftUI. We use @Appstorage too reload our body view property whenever the value changes of our UserDefaults. This keeps our view up to date with the data that we have stored. Let’s take a look at an example on how we can use @Appstorage in our SwiftUI project.
Feb 8, 2021 Read PostIn this post we are going to take a look at how we can add a tab bar view to our SwiftUI app. Tab bar views are used to display a view when the tab item is selected. For this example we will simply have two tab views that will show a text view with a different background color. Let’s start by creating our example views that we will assign to our tab bar.
Jan 18, 2021 Read PostIn this post we are going to take a look at how we can get JSON data from an API and show it in a list view in SwiftUI. Let’s jump right in a get started by creating a new SwiftUI project.
Jan 11, 2021 Read PostMaking a phone call from a SwiftUI app is easy and only takes a few lines of code to implement. All we need to do is setup a button that will open the phone app and make a phone call with a phone number we pass in.
Jan 3, 2021 Read Post@StateObject and @ObservedObject are very similar in that they both keep track of an objects state. The difference is @StateObject is owned by the view it was created in where as @ObservedObject is owned by another view.
Dec 23, 2020 Read PostSwiftUI makes opening a URL with your default web browser super easy with the Link view. All you need to do is give it a title and a destination URL. Let us take a look at the example below.
Dec 11, 2020 Read PostSwiftUI makes it easy to add a blur effect to any view. All we need to do is add the .blur() modifier to our view. Let’s see how we can apply this by looking at the example below.
Dec 3, 2020 Read PostSF Symbols are set of over 2,000 symbols created by Apple for developers to use in there apps. SF Symbols are dynamic. This means that they will automatically align with the size and weight of text in our app. We can use these symbols for almost anything but they are most commonly used in toolbars, menus, and navigation bars.
Nov 23, 2020 Read PostIn this post we are going to learn how to make a SwiftUI button that expands out to show more button options. Below is an example of what our button will look like when we are finished.
Oct 23, 2020 Read PostSwiftUI allows us to add our own custom views and modifiers to Xcode’s library. By doing this we are able to easily access our custom views and add them into our code in just a click. Let’s see how we can take advantage of this in our own SwiftUI project.
Oct 17, 2020 Read PostAs of iOS 14 we can now use the new .redacted(reason:) modifier in SwiftUI to make placeholders for our views. Let’s take a look at the example below to get a better understanding of how we can add placeholders to our SwiftUI project.
Oct 8, 2020 Read PostSign in with Apple makes it safe and secure for users to login to websites and apps. We can implement Sign in with Apple easily with SwiftUI 2. For us to use Sign in with Apple in our app we are required to use iOS 14 or later and Xcode 12 or later.
Sep 28, 2020 Read PostSidebars are really useful for navigating on bigger screen such as iPad’s and the Mac’s. We are going to take a look at how we can implement sidebars into a multiplatform SwiftUI app.
Sep 22, 2020 Read PostAt WWDC 2020 Apple introduced ProgressView’s to SwiftUI. A ProgressView allows us to show either a circular progress view or a linear progress view for when tasks are loading in our app.
Sep 17, 2020 Read PostAs of iOS 14 and SwiftUI 2 we can now add a pop out menu to any button in our app. We can implement this by using the new Menu keyword. Menus in some way are going to replace the current action sheets used in iOS apps. The problem with action sheets is they only show up at the bottom of our screen. This doesn’t look great on larger screens like the iPad and Mac. Menus allow the flexibility in where we would want to show pop out menus in our app instead of only showing them at the bottom of our screens.
Sep 2, 2020 Read PostAs of WWDC 2020, SwiftUI has made it insanely easy to add keyboard shortcuts to any SwiftUI app. Let’s look at how we can add keyboard shortcuts to our project by looking at the code example below.
Aug 19, 2020 Read PostAs of iOS 14, SwiftUI now gives developers two new UI components called LazyVGrid and LazyHGrid. LazyVGrid is used for creating vertical grids and LazyHGrid is used for horizontal grids. The keyword Lazy means that the grids view does not create items for the grid until they are needed to appear on screen. This allows our app to have much faster loading times when using grids!
Aug 5, 2020 Read PostSwiftUI makes it really simply to detect when dark mode is enabled. We simply have to add a @Enviroment variable and use .colorScheme property to scan the settings on our device and see if dark mode is enabled.
Jul 20, 2020 Read PostAt WWDC 2020 disclosure groups were announced for SwiftUI. Disclosure groups are very similar to how drop down menus work on the Mac. Apple’s documentation defines it as “A view that shows or hides another content view, based on the state of a disclosure control”.
Jul 8, 2020 Read PostIn this post we are going to take a look at how to customize images in SwiftUI.
Jul 1, 2020 Read PostIn this post we are going to take a quick look at how to style text in SwiftUI.
Jun 19, 2020 Read PostA secure textfield allows us to display a editable text area that hides the text the user inputs. In this post I will show you how easy it is to implement a secure textfield in a SwiftUI project.
Apr 25, 2020 Read PostIn this quick post we are going to look at how we can make views in SwiftUI have rounded corners. You can round the corners of any SwiftUI view by using the cornerRadius() modifier. Simply add a value to the cornerRadius to control how rounded you want the view to be. Let us look at a simple example below.
Apr 10, 2020 Read PostApple’s latest update now includes support for you to connect a mouse or a trackpad to your iPad in iPadOS 13.4! This is really cool but how can we implement this in our own SwiftUI app for iPad. The good news is Apple makes this simple by giving us two modifiers .hoverEffect and .onHover to add to our SwiftUI views. Let us start by opening up Xcode and in a SwiftUI project add the following code.
Apr 2, 2020 Read PostIn this post we are going to see how we can add haptic feedback to a button in SwiftUI. Apple gives us preset haptic options for us to choose from in the UINotificationFeedbackGenerator class. The haptics we can choose from are as follows:
Mar 11, 2020 Read PostIn this article we are going to make a simple map in SwiftUI. This map will show the users location and show how we can set pins (annotations) on our map.
Mar 8, 2020 Read PostToday we are going to learn how to make an image carousel for displaying images in your app. Image carousels are a great way to show your user multiple images with only using a small amount of screen real estate.
Feb 12, 2020 Read PostUIActivityViewController is a class that makes sharing content to other services on your apple device super simple. All you need to do is tell it what kind of content you want to share and UIActivityViewController take care of most of the heavy lifting. Here is how to implement it.
Feb 6, 2020 Read PostWhat are property wrappers? Property wrappers in SwiftUI can be described as _@_State, @Binding, @ObservedObject, @EnvironmentObject, and @Environment. Let’s go through each one and get a better understanding of how to use these property wrappers to help us program in SwiftUI.
Jan 14, 2020 Read PostRecently I have been work on a little side project using SwiftUI in a stand alone watchOS app. When building my watchOS I was confused as to where I put the icon for my app since there are two Asset.xcassets file.
Jan 4, 2020 Read PostIn this tutorial we are going to look at how to make a Form in SwiftUI. The Form view helps make things like sign in sheets very simple and fast to setup in your app. With just a few simple lines of code you will have a form up and running. Let’s get started with making a contact form sheet.
Jan 2, 2020 Read PostIn this article we are going to learn how to use the NavigationView library to navigate from one view to another in SwiftUI. We will look at the most basic way to transition from a view using a button and a NavigationLink.
Dec 26, 2019 Read PostIn SwiftUI, to present a modal view we need to use a new display modifier called sheets. To present a view modally we first need to start by creating a new SwiftUI file and name it ModalPresentedView. Go to File > New > File and choose iOS > User Interface > SwiftUI View. Then add the code below to our Modal view.
Nov 19, 2019 Read PostAs of this posting I was having a problem with an Apple Watch app I was trying to make using SwiftUI. The problem was text was not wrapping around my view that was nested in a ScrollView and VStack. I found that by adding these modifiers to your text will giving you multiple lines for text! Happy Coding!
Nov 5, 2019 Read Post