Guest User

Untitled

a guest
Aug 21st, 2019
90
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ContentView.swift
  2. // Text Pong
  3. //
  4. // Created by Thomas Braun on 8/21/19.
  5. // Copyright © 2019 Thomas Braun. All rights reserved.
  6. //
  7.  
  8. import SwiftUI
  9.  
  10. struct ContentView: View {
  11. var body: some View {
  12. VStack(spacing: 250.0) {//Contains both the triangles
  13. VStack {//User Triangle
  14. HStack(spacing: 15.0) {
  15. Button(action: {}) {
  16. Text("7")
  17. .font(.largeTitle)
  18. }
  19. Button(action: {}) {
  20. Text("8")
  21. .font(.largeTitle)
  22. }
  23. Button(action: {}) {
  24. Text("9")
  25. .font(.largeTitle)
  26. }
  27. Button(action: {}) {
  28. Text("10")
  29. .font(.largeTitle)
  30. }
  31. }
  32. HStack(spacing: 15.0) {
  33. Button(action: {}) {
  34. Text("6")
  35. .font(.largeTitle)
  36. }
  37. Button(action: {}) {
  38. Text("5")
  39. .font(.largeTitle)
  40. }
  41. Button(action: {}) {
  42. Text("4")
  43. .font(.largeTitle)
  44. }
  45. }
  46. HStack(spacing: 15.0) {
  47. Button(action: {}) {
  48. Text("3")
  49. .font(.largeTitle)
  50. }
  51. Button(action: {}) {
  52. Text("2")
  53. .font(.largeTitle)
  54. }
  55. }
  56. HStack(spacing: 15.0) {
  57. Button(action: {}) {
  58. Text("1")
  59. .font(.largeTitle)
  60. }
  61. }
  62. }
  63.  
  64. // Text("Game On")
  65.  
  66. VStack {//Opponent Triangle
  67. HStack {
  68. VStack {
  69. Button(action: {}) {
  70. Text("1")
  71. .font(.largeTitle)
  72. }
  73. HStack {
  74. Button(action: {}) {
  75. Text("2")
  76. .font(.largeTitle)
  77. }
  78. Button(action: {}) {
  79. Text("3")
  80. .font(.largeTitle)
  81. }
  82. }
  83. HStack {
  84. Button(action: {}) {
  85. Text("4")
  86. .font(.largeTitle)
  87. }
  88. Button(action: {}) {
  89. Text("5")
  90. .font(.largeTitle)
  91. }
  92. Button(action: {}) {
  93. Text("6")
  94. .font(.largeTitle)
  95. }
  96. }
  97. HStack {
  98. Button(action: {}) {
  99. Text("7")
  100. .font(.largeTitle)
  101. }
  102. Button(action: {}) {
  103. Text("8")
  104. .font(.largeTitle)
  105. }
  106. Button(action: {}) {
  107. Text("9")
  108. .font(.largeTitle)
  109. }
  110. Button(action: {}) {
  111. Text("10")
  112. .font(.largeTitle)
  113. }
  114. }
  115. }
  116. }
  117.  
  118.  
  119. }// Ending Opponent Triangle verticle Stack
  120. }
  121. }
  122. }
  123.  
  124. struct ContentView_Previews: PreviewProvider {
  125. static var previews: some View {
  126. ContentView()
  127. }
  128. }
RAW Paste Data