Implementing the Activity Button Screen
In this section, we will implement our application’s activity button screen and thus complete the fourth and final project in this book. Before we do this, we must implement a swipeable page system. The first page will contain the implementation from the previous chapter, and the second page will be the activity buttons. Naturally, you can use this to expand to as many pages as you require.
Swipeable Pages
In this section, we will implement our swipeable pages. Luckily for us, it is super simple to implement as many things as possible in SwiftUI. Simply enclose our current VStack
in the MainView
inside a TabView
as demonstrated here:
TabView{ VStack( alignment: .leading ) { Text( timerString ) .font( .title2 ) ...