SwiftUI 3 introduced a brand spanking new view called ✨ Canvas ✨ for rich and dynamic 2D graphics drawing.

Canvas view passes GraphicsContext and Size values to it closure which can be used to perform immediate mode drawing. Canvas can draw path, image, or complete SwiftUI views inside it.

Let’s…


Introduced in iOS 15 and SwiftUI 3, foregroundStyle is a new modifier which can be used to apply color or pattern as foreground to view. This modifier can be applied to style content of text, shapes, symbols, images etc.

Let’s start by setting foreground style with orange color:

struct ForegroundStyleExample…


SwiftUI 3 and release of iOS 15 added native support for badges. Badge play a significant role in my apps today. Before the release of SwiftUI 3, badge support would require custom implementation but with the introduction of .badge modifier, adding badge is easier than ever.

Badges in iOS are…


Another new feature introduced in SwiftUI 3 is safeAreaInset(edge:alignment:spacing:content:) . It provides a way for views to show view beside the modified view.

Last sentence made me dizzy 😵‍💫 so let’s look at an example.

In this example, we will take another look at DevTechie Course app where our home…


Lists are one of the most popular views used in SwiftUI and SwiftUI 3 changes made List view even better.

In this article, we will look at new changes that were brought in for List in SwiftUI 3. Topics will be:

  • List Row Separator
  • List Row Separator Tint Color
  • List…


Several new additions have been made to button control under SwiftUI 3 and iOS 15 release and in this article, we will be looking at four major changes that will make buttons look better out of the box.

BorderShape:

Button’s border can be created by adding a background modifier to…


ButtonStyle modifier has been around in SwiftUI since beginning but with the release of iOS 15, SwiftUI team at Apple decided to optimize it further and made a few more style available out of the box.

In this article, we will look at new signature for buttonStyle and newly introduced…


Introduced in iOS 15, confirmationDialog modifier gives a way to show actionSheet on iPhone and popover menu on iPad. confirmationDialog is supported across the Apple platform which used SwiftUI so it will work for iOS, iPadOS, macOS and watchOS. …


SwiftUI’s List and ForEach are one of the most common views used to build UI. They are undoubtedly one of the feature pack views available in the framework as well.

Today, we will look at how to build out Twitter’s home page layout where retweet counts and like counts are…


@FocusState is a new property wrapper introduced in iOS 15 in conjunction with focused modifier. FocusState this property wrapper provides a way to read and write current focus positions within the view hierarchy.

The way this property wrapper works is when focus enters the view being modified, the wrapped value…

DevTechie

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