diff --git a/Demo/Integrations/ViewController.swift b/Demo/Integrations/ViewController.swift index 6aa43207..8d433650 100644 --- a/Demo/Integrations/ViewController.swift +++ b/Demo/Integrations/ViewController.swift @@ -8,7 +8,7 @@ import Pulse import SwiftUI final class ViewController: UIViewController, UITableViewDataSource, UITableViewDelegate { - private let tableView = UITableView(frame: .zero, style: .grouped) + private let tableView = UITableView(frame: .zero, style: .insetGrouped) private var sections: [MenuSection] = [] override func viewDidLoad() { @@ -30,15 +30,23 @@ final class ViewController: UIViewController, UITableViewDataSource, UITableView ]), MenuSection(title: "Components", footer: "Demonstrates how you can push individual PulseUI screens into an existing navigation (UINavigationController or NavigationView)", items: [ MenuItem(title: "ConsoleView", action: { [unowned self] in - let vc = UIHostingController(rootView: ConsoleView(store: .mock)) + let vc = UIHostingController(rootView: ConsoleView(store: .mock).closeButtonHidden()) self.navigationController?.pushViewController(vc, animated: true) }), MenuItem(title: "ConsoleView (Logs)", action: { [unowned self] in - let vc = UIHostingController(rootView: ConsoleView(store: .mock, mode: .logs)) + let vc = UIHostingController(rootView: ConsoleView(store: .mock, mode: .logs).closeButtonHidden()) self.navigationController?.pushViewController(vc, animated: true) }), MenuItem(title: "ConsoleView (Network)", action: { [unowned self] in - let vc = UIHostingController(rootView: ConsoleView(store: .mock, mode: .network)) + let vc = UIHostingController(rootView: ConsoleView(store: .mock, mode: .network).closeButtonHidden()) + self.navigationController?.pushViewController(vc, animated: true) + }) + ]), + MenuSection(title: "Custom Views", footer: "Custom views into the underlying logger data", items: [ + MenuItem(title: "User Analytics", action: { [unowned self] in + let view = DebugAnalyticsView() + .environment(\.managedObjectContext, LoggerStore.mock.viewContext) + let vc = UIHostingController(rootView: view) self.navigationController?.pushViewController(vc, animated: true) }) ]),