SwiftUI View "isPlaceholder" not available in current build

Hey,

I just cam across the WidgetKit Code along and the Apple engineer uses a modifier named
Code Block
isPlaceholder(true)

This creates a nice looking view for the Widget placeholders.
The complete sample code is:
Code Block
struct PlaceholderView : View {
    var body: some View {
        AvatarView(.panda)
            .isPlaceholder(true)
    }
}

On the current Xcode 12 this API is not available as it looks and the documentation does not mention it as well.

Will it be part of a future beta?

Kind regards


Answered by ForumsContributor in
I'm following the same Code-along and ran into the exact same issue. The modifier .isPlaceholder is not available.

Value of type 'AvatarView' has no member 'isPlaceholder'

By the way, you might want to tag your post with wwdc20-10034 so fellow coders can find it more easily too.


Accepted Answer
According to the Response from Frameworks Engineer, it's not available in Beta 1 yet - we will have to wait.

SwiftUI View "isPlaceholder" not available in current build
 
 
Q