Sample Code

Building Custom Views in SwiftUI

Create a custom view with data driven transitions and animations in SwiftUI.



Configure the Sample Code Project

Before you run the sample code project in Xcode:

  • Use Xcode 11 beta.

  • To run on a device, chose your development team in the Signing and Capabilities tab of the target settings.

See Also


Drawing Paths and Shapes

Users receive a badge whenever they visit a landmark in their list. Of course, for a user to receive a badge, you’ll need to create one. This tutorial takes you through the process of creating a badge by combining paths and shapes, which you then overlay with another shape that represents the location.

protocol Shape

A 2D shape that you can use when drawing a view.