Skip to content

Instantly share code, notes, and snippets.

@sparklone
sparklone / DebugView.swift
Created July 12, 2020 15:20
Helper to debug SwiftUI view lifecycle and redraw
import SwiftUI
public struct DebugView<MainView: View>: View {
private let view: MainView
private let logType: LogType
private enum LogType {
case onlyDescription(String)
case descriptionAndDumpView(String)
case dumpView