While working with the Emoji Rangers Sample Code, I noticed that .redacted(reason:) seems to ignore the minimumScaleFactor() modifier - I have reproduced this behaviour with Xcode 16 and Xcode 16.1 beta 2 on iOS and on the Mac:
struct ContentView: View {
@State private var isRedacted: Bool = false
var body: some View {
VStack {
Image(systemName: "globe")
.imageScale(.large)
.foregroundStyle(.tint)
Text("Hello, world!")
.font(.largeTitle)
Toggle("Redacted", isOn: $isRedacted)
}
.padding()
.minimumScaleFactor(0.1)
.redacted(reason: isRedacted ? .placeholder : .invalidated)
}
}
As long as the minimumScaleFactor does not kick in, redacted seems to work as expected:
But then it does not:
I tried changing the order of both modifiers with no effect. Wonder if this is expected and there is a way to make it work so it preserves the scaled down layout or a bug?
Filed just in case: FB15270541 (.redacted(reason:) modifier ignores .minimumScaleFactor)