InjectPreview Macro for InjectionIII

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 InjectPreview for SwiftUI views with real-time injection.
  • UIKit Preview: Easily preview UIView and UIViewController in running apps.
  • Debug Only: Available only in DEBUG builds.
#InjectPreview {
   @State var value = 1
   Button("\(value)") {
     value += 1
   }
}
2 Likes