DemoPlaceHolderView.swift 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. //
  2. // DemoPlaceHolderView.swift
  3. // LoopKitUI
  4. //
  5. // Created by Nathaniel Hamming on 2023-05-18.
  6. // Copyright © 2023 LoopKit Authors. All rights reserved.
  7. //
  8. import SwiftUI
  9. public struct DemoPlaceHolderView: View {
  10. var appName: String
  11. public init(appName: String) {
  12. self.appName = appName
  13. }
  14. public var body: some View {
  15. VStack {
  16. Spacer()
  17. VStack(alignment: .center, spacing: 30) {
  18. Image(systemName: "minus.circle")
  19. .font(Font.system(size: 76, weight: .bold))
  20. Text("Nothing to See Here!")
  21. .font(.title2)
  22. .bold()
  23. Text("This section of the \(appName) app is unavailable in this simulator.")
  24. .multilineTextAlignment(.center)
  25. Text("Tap back to continue exploring the rest of the \(appName) interface.")
  26. .multilineTextAlignment(.center)
  27. }
  28. .padding(.horizontal, 40)
  29. .padding(.top, -130) // to center the copy
  30. Spacer()
  31. }
  32. .background(Color(.systemGroupedBackground))
  33. .navigationBarTitleDisplayMode(.inline)
  34. }
  35. }
  36. struct DemoPlaceHolderView_Previews: PreviewProvider {
  37. static var previews: some View {
  38. DemoPlaceHolderView(appName: "Loop")
  39. }
  40. }