SwiftUIKitView icon indicating copy to clipboard operation
SwiftUIKitView copied to clipboard

`UILabel` Preview Example not working

Open MarcoEidinger opened this issue 3 years ago • 1 comments

UILabel Preview Example in project SwiftUIKitExample.xcodeproj does not work.

        UILabel() // <- This is a `UIKit` view.
            .swiftUIView(layout: .intrinsic) // <- This is a SwiftUI `View`.
            .set(\.text, to: "Hello, UIKit!") // <- Use key paths for updates.
            .fixedSize() // <- Make sure the size is set
            .previewLayout(.sizeThatFits)
            .previewDisplayName("UILabel Preview Example")
    }

Expected to see the text "Hello, UIKit!" but that text is not visible in the preview :(

https://user-images.githubusercontent.com/4176826/193900800-b6b01da1-5898-43b8-a3a8-2606e380f04c.mov

Tested with Xcode 14.0.1 and iPhone 13 (iOS 16) simulator

MarcoEidinger avatar Oct 04 '22 18:10 MarcoEidinger

I think it's working on Xcode 14.

gcohen-dev avatar Dec 13 '22 11:12 gcohen-dev