Advertisement
Xaniasty

Untitled

Jun 12th, 2024
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.09 KB | None | 0 0
  1. import SwiftUI
  2.  
  3. struct ContentView: View {
  4. var body: some View {
  5. NavigationView {
  6. VStack {
  7. Spacer()
  8.  
  9. Text("Witamy w X")
  10. .font(.largeTitle)
  11. .padding(.bottom, 10)
  12. .accessibilityLabel("Welcome to X")
  13.  
  14. Text("Wybierz sposób logowania")
  15. .font(.subheadline)
  16. .padding(.bottom, 40)
  17. .accessibilityLabel("Choose a login method")
  18.  
  19. VStack(spacing: 20) {
  20. NavigationLink(destination: PhotoGridView()) {
  21. Text("Jako gość")
  22. .font(.headline)
  23. .frame(minWidth: 0, maxWidth: .infinity)
  24. .padding()
  25. .background(Color.blue)
  26. .foregroundColor(.white)
  27. .cornerRadius(10)
  28. }
  29. .accessibilityLabel("Login as guest")
  30.  
  31. Button(action: {
  32. // Akcja dla przycisku "Zaloguj się"
  33. }) {
  34. Text("Zaloguj się")
  35. .font(.headline)
  36. .frame(minWidth: 0, maxWidth: .infinity)
  37. .padding()
  38. .background(Color.green)
  39. .foregroundColor(.white)
  40. .cornerRadius(10)
  41. }
  42. .accessibilityLabel("Login")
  43. }
  44. .padding(.horizontal, 40)
  45.  
  46. Spacer()
  47. }
  48. .navigationBarTitle("Ekran Logowania", displayMode: .inline)
  49. }
  50. }
  51. }
  52.  
  53. struct PhotoGridView: View {
  54. var body: some View {
  55. Text("Photo Grid View")
  56. }
  57. }
  58.  
  59. struct ContentView_Previews: PreviewProvider {
  60. static var previews: some View {
  61. ContentView()
  62. }
  63. }
  64.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement