Thank you! Somehow I thought I already checked that. I shouldn't post "bugs" late at night 😓
Post
Replies
Boosts
Views
Activity
Wow, sorry for that horrible formatting. I didn't know that comments don't do newlines...
This does not seem to work with @State inside the TextModifier implementation.
e.g. something like:
struct HulkSmash: TextModifier {
@State var isHulk: Bool = false
func body(text: Text) -> some View {
text.bold()
.font(isHulk ? .system(.largeTitle, design: .rounded) : .body)
.foregroundColor(isHulk ? .init(.systemGreen) : .init(.systemFill))
.onTapGesture {
print("tap triggered")
isHulk.toggle()
}
}
}
Do you have any idea why that would be the case?
It seems like "." is not repeating the last command.