Hey Hello,
We are thrilled to integrate LibraryContentProvider protocols with MAXWELL LUX (the first UI Look Development SDK for iOS https://apps.apple.com/us/app/id1511215075).
Version 12.0 beta (12A6159)
We imported the LUX framework as an SPM package:
https://github.com/maxwelldesign/lux
Next we created an APP template and modified the ContentView with the following implementation.
Expectation.
The Views and Modifiers would should in the Lirbary
Result
The following implementations failed:
PD. Thanks for making this wonderful tech possible. You are truly light wizards!
We are thrilled to integrate LibraryContentProvider protocols with MAXWELL LUX (the first UI Look Development SDK for iOS https://apps.apple.com/us/app/id1511215075).
Version 12.0 beta (12A6159)
We imported the LUX framework as an SPM package:
https://github.com/maxwelldesign/lux
Next we created an APP template and modified the ContentView with the following implementation.
Expectation.
The Views and Modifiers would should in the Lirbary
Result
The following implementations failed:
Simple Passthrough
LibraryItem(base,title: "PASSTHROUGH", category: .other),
AnyView transform
LibraryItem(AnyView(base),title: "ANYVIEW TEST", category: .other),
We are very interested in learning the correct way to configure for Using modifier defined in SPM Framework.Using modifier defined in SPM Framework
LibraryItem(base.lux.style(.buttonLarge),title: "LUX BUTTON LARGE", category: .other)
Code Block swift import SwiftUI import Lux struct ContentView: View { var body: some View { Text("LibraryContentProvider Test").padding() } } struct ContentView_Previews: PreviewProvider { static var previews: some View { ContentView() } } extension View{ func localModifier()->AnyView{ AnyView(self) } } struct LibraryViewContent: LibraryContentProvider { @LibraryContentBuilder var views: [LibraryItem] { LibraryItem(ContentView().lux.view,title: "LUX VIEW TEST") } func modifiers(base: AnyView) -> [LibraryItem] { [ LibraryItem(base.blur(radius: 1),title: "BLUR OK", category: .other), LibraryItem(base.localModifier(),title: "LOCAL MOD", category: .other), LibraryItem(base,title: "PASSTHROUGH", category: .other), LibraryItem(AnyView(base),title: "ANYVIEW TEST", category: .other), LibraryItem(base.lux.style(.buttonLarge),title: "LUX BUTTON LARGE", category: .other) ] } }
PD. Thanks for making this wonderful tech possible. You are truly light wizards!