SwiftUI isPlaceholder not showing

Apple Recommended

Replies

Is there a tentative timeline for this to be available? It is still not present in Beta 2.

Thanks.
maybe in beta 3? not in beta 2
Oh, still waiting..
It is available on beta 3 finally!
it's actually deprecated in Beta 3 and replaced by "redacted". I am not sure yet how this is supposed to be used.
You can just use this on a view, instead of .isPlaceholder:

Code Block
.redacted(reason: .placeholder)

Still not available in Beta 5?
I'm a bit confused about this, to be honest. As I just started using the Betas since 3 or 4, for me it looks like it never actually was there. But now as of Beta 5 it kinda automatically applies this effect to widgets (during loading)?!
I'm using the official Xcode 12 and it's also not there.

Edit: The following worked. I just had to refresh the preview to see the change.

.redacted(reason: .placeholder)
In video "Build SwiftUI views for widgets" author use .isPlaceholder(false) to set view is not placeholder, but... It's not available >____<

Code Block
Value of type 'Text' has no member 'isPlaceholder'

Xcode Version 12.0.1 (12A7300)

Code Block
@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *)
extension View {
    public func redacted(reason: RedactionReasons) -> some View
    public func unredacted() -> some View
}

yes11!