InjectPreview Macro for InjectionIII
I've created a small package with custom Swift macros that integrate with the InjectionIII tool, allowing live previews of SwiftUI views, UIView
s, and UIViewController
s during runtime.
Features:
- SwiftUI Preview: Use
InjectPreview
for SwiftUI views with real-time injection. - UIKit Preview: Easily preview
UIView
andUIViewController
in running apps. - Debug Only: Available only in DEBUG builds.
#InjectPreview {
@State var value = 1
Button("\(value)") {
value += 1
}
}