Răsfoiți Sursa

Update picker style and set sample deployment target to iOS 14 (#131)

* Update picker style and set sample deployment target to iOS 13

* Update iOS version to 14 and remove unnecessary accessibilityLabels

Co-authored-by: Peter Andrews <petea@google.com>
mdmathias 3 ani în urmă
părinte
comite
b0f8d26f08

+ 2 - 2
Samples/Swift/DaysUntilBirthday/DaysUntilBirthday.xcodeproj/project.pbxproj

@@ -414,7 +414,7 @@
 				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
 				GCC_WARN_UNUSED_FUNCTION = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
-				IPHONEOS_DEPLOYMENT_TARGET = 14.5;
+				IPHONEOS_DEPLOYMENT_TARGET = 14.0;
 				MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
 				MTL_FAST_MATH = YES;
 				ONLY_ACTIVE_ARCH = YES;
@@ -471,7 +471,7 @@
 				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
 				GCC_WARN_UNUSED_FUNCTION = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
-				IPHONEOS_DEPLOYMENT_TARGET = 14.5;
+				IPHONEOS_DEPLOYMENT_TARGET = 14.0;
 				MTL_ENABLE_DEBUG_INFO = NO;
 				MTL_FAST_MATH = YES;
 				SDKROOT = iphoneos;

+ 0 - 1
Samples/Swift/DaysUntilBirthday/Shared/Views/BirthdayView.swift

@@ -25,7 +25,6 @@ struct BirthdayView: View {
       VStack {
         Text(birthdayViewModel.daysUntilBirthday)
           .font(.system(size: 80))
-          .accessibilityLabel("Number of days until your birthday")
         Spacer()
       }
       .navigationTitle(NSLocalizedString("Days Until Birthday",

+ 1 - 1
Samples/Swift/DaysUntilBirthday/Shared/Views/SignInView.swift

@@ -64,7 +64,7 @@ struct SignInView: View {
             }
           }
           #if os(iOS)
-            .pickerStyle(.automatic)
+            .pickerStyle(.segmented)
           #endif
         }
       }

+ 0 - 5
Samples/Swift/DaysUntilBirthday/iOS/UserProfileView.swift

@@ -34,9 +34,7 @@ struct UserProfileView: View {
             VStack(alignment: .leading) {
               Text(userProfile.name)
                 .font(.headline)
-                .accessibilityLabel(Text("User name."))
               Text(userProfile.email)
-                .accessibilityLabel(Text("User email."))
             }
           }
           NavigationLink(NSLocalizedString("View Days Until Birthday", comment: "View birthday days"),
@@ -57,14 +55,11 @@ struct UserProfileView: View {
         .toolbar {
           ToolbarItemGroup(placement: .navigationBarTrailing) {
             Button(NSLocalizedString("Disconnect", comment: "Disconnect button"), action: disconnect)
-              .accessibilityLabel(Text("Disconnect scope button."))
             Button(NSLocalizedString("Sign Out", comment: "Sign out button"), action: signOut)
-              .accessibilityLabel(Text("Sign out button"))
           }
         }
       } else {
         Text(NSLocalizedString("Failed to get user profile!", comment: "Empty user profile text"))
-          .accessibilityLabel(Text("Failed to get user profile"))
       }
     }
   }

+ 0 - 6
Samples/Swift/DaysUntilBirthday/macOS/UserProfileView.swift

@@ -18,22 +18,18 @@ struct UserProfileView: View {
             VStack(alignment: .leading) {
               Text(userProfile.name)
                 .font(.headline)
-                .accessibilityLabel(Text("User name."))
               Text(userProfile.email)
-                .accessibilityLabel(Text("User email."))
             }
           }
           Button(NSLocalizedString("Sign Out", comment: "Sign out button"), action: signOut)
             .background(Color.blue)
             .foregroundColor(Color.white)
             .cornerRadius(5)
-            .accessibilityLabel(Text("Sign out button"))
 
           Button(NSLocalizedString("Disconnect", comment: "Disconnect button"), action: disconnect)
             .background(Color.blue)
             .foregroundColor(Color.white)
             .cornerRadius(5)
-            .accessibilityLabel(Text("Disconnect scope button."))
           Spacer()
           NavigationLink(NSLocalizedString("View Days Until Birthday", comment: "View birthday days"),
                          destination: BirthdayView(birthdayViewModel: birthdayViewModel).onAppear {
@@ -51,12 +47,10 @@ struct UserProfileView: View {
             .background(Color.blue)
             .foregroundColor(Color.white)
             .cornerRadius(5)
-            .accessibilityLabel(Text("View days until birthday."))
           Spacer()
         }
       } else {
         Text(NSLocalizedString("Failed to get user profile!", comment: "Empty user profile text"))
-          .accessibilityLabel(Text("Failed to get user profile"))
       }
     }
   }