Created
April 2, 2020 07:33
-
-
Save wizard1066/f65c67b334ccbcfb2afd38fc1ac5c4c5 to your computer and use it in GitHub Desktop.
abgwtpC
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
VStack(alignment: .center, spacing: 5) { | |
ForEach((0 ..< 4).reversed(), id: \.self) { row in | |
HStack(alignment: .center, spacing: 5) { | |
ForEach((0 ..< 4).reversed(), id: \.self) { column in | |
return VStack { | |
if self.textColors[fCalc(c: column, r: row)] == Color.clear { | |
Text(self.textText[fCalc(c: column, r: row)]) | |
.font(Fonts.futuraCondensedMedium(size:48)) | |
.frame(width: 64, height: 64, alignment: .center) | |
.background(InsideView(rect: self.$rect)) | |
.onDrop(of: ["public.utf8-plain-text"], delegate: dropDelegate) | |
} else { | |
Text(self.textText[fCalc(c: column, r: row)]) | |
.onTapGesture { | |
self.textText[fCalc(c: column, r: row)] = "" | |
self.textColors[fCalc(c: column, r: row)] = Color.clear | |
} | |
.font(Fonts.futuraCondensedMedium(size:48)) | |
.frame(width: 64, height: 64, alignment: .center) | |
.background(self.textColors[fCalc(c: column, r: row)]) | |
.onDrop(of: ["public.utf8-plain-text"], delegate: dropDelegate) | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment