From affc9f8980e9cd8a9548f6f47a64ab31aec6bba0 Mon Sep 17 00:00:00 2001 From: swg99 <87419041+swg99@users.noreply.github.com> Date: Wed, 28 Jul 2021 14:08:22 +0100 Subject: [PATCH] Edited AppDelegate to use ContentView --- Rick-and-Morty/Rick And Morty/AppDelegate.swift | 13 +++++++------ .../Rick And Morty/Views/ContentView.swift | 1 + 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Rick-and-Morty/Rick And Morty/AppDelegate.swift b/Rick-and-Morty/Rick And Morty/AppDelegate.swift index 31619e2..4bc13f8 100644 --- a/Rick-and-Morty/Rick And Morty/AppDelegate.swift +++ b/Rick-and-Morty/Rick And Morty/AppDelegate.swift @@ -1,10 +1,11 @@ import UIKit +import SwiftUI -@UIApplicationMain -class AppDelegate: UIResponder, UIApplicationDelegate { - var window: UIWindow? - - func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { - return true +@main +struct RickAndMorty: App { + var body: some Scene { + WindowGroup { + ContentView() + } } } diff --git a/Rick-and-Morty/Rick And Morty/Views/ContentView.swift b/Rick-and-Morty/Rick And Morty/Views/ContentView.swift index 7c0972f..3501bbe 100644 --- a/Rick-and-Morty/Rick And Morty/Views/ContentView.swift +++ b/Rick-and-Morty/Rick And Morty/Views/ContentView.swift @@ -9,6 +9,7 @@ import SwiftUI struct ContentView: View { + var body: some View { TabView { CharactersView(characters: ricks, title: "Ricks")