New SwiftUI: How to create custom pop-ups using Xcode 14
3 min readNov 22, 2022
Hello everyone, welcome to a new SwiftUI tutorial. I hope you are all doing well. Today I am going to show you how to design a custom pop-ups in SwiftUI 4 and Xcode 14.
Let’s get started with opening up Xcode 14. We are going to create a new Swift file and called this Task and another file called Extensions.
import SwiftUI
struct Task: Identifiable {
var id = UUID().uuidString
var taskTitle: String
var taskDescription: String
}
var tasks: [Task] = [
Task(taskTitle: "Filming", taskDescription: "Discuss with the team what we are filming this week."),
Task(taskTitle: "New Art work", taskDescription: "Edit Art for the channel."),
Task(taskTitle: "UI Tasks", taskDescription: "Talk with team about the design."),
Task(taskTitle: "Look at Website", taskDescription: "Have a look at website and go over notes."),
Task(taskTitle: "Meeting with Client", taskDescription: "Look at the UX/UI Design."),
Task(taskTitle: "Half a Day", taskDescription: "Go for Lunch with team."),
Task(taskTitle: "Work on TiKTok Videos", taskDescription: "Discuss TikTok with the team."),
Task(taskTitle: "YouTube Review", taskDescription: "Look at the overall channel."),
]
import SwiftUI
extension View {
func popupNavigationView<Content: View>(horizontalPadding: CGFloat = 40,show…