Przeglądaj źródła

Update iOS version to 14 and remove unnecessary accessibilityLabels

Matthew Mathias 3 lat temu
rodzic
commit
b77fe1f33a

+ 4 - 4
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 = 13.0;
+				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 = 13.0;
+				IPHONEOS_DEPLOYMENT_TARGET = 14.0;
 				MTL_ENABLE_DEBUG_INFO = NO;
 				MTL_FAST_MATH = YES;
 				SDKROOT = iphoneos;
@@ -490,7 +490,7 @@
 				DEVELOPMENT_ASSET_PATHS = "\"iOS/Preview Content\"";
 				ENABLE_PREVIEWS = YES;
 				INFOPLIST_FILE = iOS/Info.plist;
-				IPHONEOS_DEPLOYMENT_TARGET = 13.0;
+				IPHONEOS_DEPLOYMENT_TARGET = 14.0;
 				LD_RUNPATH_SEARCH_PATHS = (
 					"$(inherited)",
 					"@executable_path/Frameworks",
@@ -511,7 +511,7 @@
 				DEVELOPMENT_ASSET_PATHS = "\"iOS/Preview Content\"";
 				ENABLE_PREVIEWS = YES;
 				INFOPLIST_FILE = iOS/Info.plist;
-				IPHONEOS_DEPLOYMENT_TARGET = 13.0;
+				IPHONEOS_DEPLOYMENT_TARGET = 14.0;
 				LD_RUNPATH_SEARCH_PATHS = (
 					"$(inherited)",
 					"@executable_path/Frameworks",

+ 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",

+ 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"))
       }
     }
   }