Minor naming improvements

This commit is contained in:
Arkadiusz Fal
2021-10-23 13:51:02 +02:00
parent 7ab5886ed4
commit 512613d350
14 changed files with 143 additions and 115 deletions

View File

@@ -0,0 +1,19 @@
import SwiftUI
struct RedrawOnModifier: ViewModifier {
@State private var changeFlag: Bool
init(changeFlag: Bool) {
self.changeFlag = changeFlag
}
func body(content: Content) -> some View {
content.opacity(changeFlag ? 1 : 1)
}
}
extension View {
func redrawOn(change flag: Bool) -> some View {
modifier(RedrawOnModifier(changeFlag: flag))
}
}