I have a view where tapping text uses .scaleEffect
to make the text disappear and reappear. An example follows:
struct ContentView: View {
@State var textScaleFactor: CGFloat = 1.0
var body: some View {
Text("Hello, world!")
.font(.title) // Makes text easier to tap.
.padding()
.scaleEffect(textScaleFactor)
.animation(.linear(duration: 0.25), value: textScaleFactor)
.onTapGesture {
textScaleFactor = textScaleFactor == 1.0 ? CGFloat.zero : 1.0
}
}
}
Tapping the text to make it disappear causes the following message to appear in the console:
ignoring singular matrix: ProjectionTransform(m11: 5e-324, m12: 0.0, m13: 0.0, m21: 0.0, m22: 5e-324, m23: 0.0, m31: 81.66666666666666, m32: 31.0, m33: 1.0)
ignoring singular matrix: ProjectionTransform(m11: 5e-324, m12: 0.0, m13: 0.0, m21: 0.0, m22: 5e-324, m23: 0.0, m31: 81.66666666666666, m32: 31.0, m33: 1.0)
Does anybody know what this means? One website says that the message is "a warning", but a warning of what?