Skip to content

Commit b0f8d26

Browse files
mdmathiaspetea
andauthored
Update picker style and set sample deployment target to iOS 14 (google#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>
1 parent 47fa877 commit b0f8d26

5 files changed

Lines changed: 3 additions & 15 deletions

File tree

Samples/Swift/DaysUntilBirthday/DaysUntilBirthday.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@
414414
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
415415
GCC_WARN_UNUSED_FUNCTION = YES;
416416
GCC_WARN_UNUSED_VARIABLE = YES;
417-
IPHONEOS_DEPLOYMENT_TARGET = 14.5;
417+
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
418418
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
419419
MTL_FAST_MATH = YES;
420420
ONLY_ACTIVE_ARCH = YES;
@@ -471,7 +471,7 @@
471471
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
472472
GCC_WARN_UNUSED_FUNCTION = YES;
473473
GCC_WARN_UNUSED_VARIABLE = YES;
474-
IPHONEOS_DEPLOYMENT_TARGET = 14.5;
474+
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
475475
MTL_ENABLE_DEBUG_INFO = NO;
476476
MTL_FAST_MATH = YES;
477477
SDKROOT = iphoneos;

Samples/Swift/DaysUntilBirthday/Shared/Views/BirthdayView.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ struct BirthdayView: View {
2525
VStack {
2626
Text(birthdayViewModel.daysUntilBirthday)
2727
.font(.system(size: 80))
28-
.accessibilityLabel("Number of days until your birthday")
2928
Spacer()
3029
}
3130
.navigationTitle(NSLocalizedString("Days Until Birthday",

Samples/Swift/DaysUntilBirthday/Shared/Views/SignInView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ struct SignInView: View {
6464
}
6565
}
6666
#if os(iOS)
67-
.pickerStyle(.automatic)
67+
.pickerStyle(.segmented)
6868
#endif
6969
}
7070
}

Samples/Swift/DaysUntilBirthday/iOS/UserProfileView.swift

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,7 @@ struct UserProfileView: View {
3434
VStack(alignment: .leading) {
3535
Text(userProfile.name)
3636
.font(.headline)
37-
.accessibilityLabel(Text("User name."))
3837
Text(userProfile.email)
39-
.accessibilityLabel(Text("User email."))
4038
}
4139
}
4240
NavigationLink(NSLocalizedString("View Days Until Birthday", comment: "View birthday days"),
@@ -57,14 +55,11 @@ struct UserProfileView: View {
5755
.toolbar {
5856
ToolbarItemGroup(placement: .navigationBarTrailing) {
5957
Button(NSLocalizedString("Disconnect", comment: "Disconnect button"), action: disconnect)
60-
.accessibilityLabel(Text("Disconnect scope button."))
6158
Button(NSLocalizedString("Sign Out", comment: "Sign out button"), action: signOut)
62-
.accessibilityLabel(Text("Sign out button"))
6359
}
6460
}
6561
} else {
6662
Text(NSLocalizedString("Failed to get user profile!", comment: "Empty user profile text"))
67-
.accessibilityLabel(Text("Failed to get user profile"))
6863
}
6964
}
7065
}

Samples/Swift/DaysUntilBirthday/macOS/UserProfileView.swift

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,18 @@ struct UserProfileView: View {
1818
VStack(alignment: .leading) {
1919
Text(userProfile.name)
2020
.font(.headline)
21-
.accessibilityLabel(Text("User name."))
2221
Text(userProfile.email)
23-
.accessibilityLabel(Text("User email."))
2422
}
2523
}
2624
Button(NSLocalizedString("Sign Out", comment: "Sign out button"), action: signOut)
2725
.background(Color.blue)
2826
.foregroundColor(Color.white)
2927
.cornerRadius(5)
30-
.accessibilityLabel(Text("Sign out button"))
3128

3229
Button(NSLocalizedString("Disconnect", comment: "Disconnect button"), action: disconnect)
3330
.background(Color.blue)
3431
.foregroundColor(Color.white)
3532
.cornerRadius(5)
36-
.accessibilityLabel(Text("Disconnect scope button."))
3733
Spacer()
3834
NavigationLink(NSLocalizedString("View Days Until Birthday", comment: "View birthday days"),
3935
destination: BirthdayView(birthdayViewModel: birthdayViewModel).onAppear {
@@ -51,12 +47,10 @@ struct UserProfileView: View {
5147
.background(Color.blue)
5248
.foregroundColor(Color.white)
5349
.cornerRadius(5)
54-
.accessibilityLabel(Text("View days until birthday."))
5550
Spacer()
5651
}
5752
} else {
5853
Text(NSLocalizedString("Failed to get user profile!", comment: "Empty user profile text"))
59-
.accessibilityLabel(Text("Failed to get user profile"))
6054
}
6155
}
6256
}

0 commit comments

Comments
 (0)