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, UIViews, and UIViewControllers during runtime.
Features:
- SwiftUI Preview: Use
InjectPreviewfor SwiftUI views with real-time injection. - UIKit Preview: Easily preview
UIViewandUIViewControllerin running apps. - Debug Only: Available only in DEBUG builds.
#InjectPreview {
@State var value = 1
Button("\(value)") {
value += 1
}
}