mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
a11y
This commit is contained in:
parent
e41bb17172
commit
666af64c18
@ -127,9 +127,12 @@ struct SGPayWallFeatureDetails: View {
|
|||||||
if #available(iOS 14.0, *) {
|
if #available(iOS 14.0, *) {
|
||||||
TabView {
|
TabView {
|
||||||
ForEach(features) { feature in
|
ForEach(features) { feature in
|
||||||
|
ScrollView(showsIndicators: false) {
|
||||||
SGProFeatureView(
|
SGProFeatureView(
|
||||||
feature: feature
|
feature: feature
|
||||||
)
|
)
|
||||||
|
// .padding(.bottom, bottomOffset)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.tabViewStyle(.page)
|
.tabViewStyle(.page)
|
||||||
@ -204,7 +207,7 @@ struct SGProFeatureView: View {
|
|||||||
feature.image
|
feature.image
|
||||||
.resizable()
|
.resizable()
|
||||||
.aspectRatio(contentMode: .fit)
|
.aspectRatio(contentMode: .fit)
|
||||||
.frame(maxWidth: .infinity, alignment: .top)
|
.frame(maxWidth: .infinity, maxHeight: 400.0, alignment: .top)
|
||||||
.clipped()
|
.clipped()
|
||||||
|
|
||||||
VStack(alignment: .center, spacing: 8) {
|
VStack(alignment: .center, spacing: 8) {
|
||||||
@ -322,7 +325,12 @@ struct SGPayWallView: View {
|
|||||||
@State private var hapticFeedback: HapticFeedback?
|
@State private var hapticFeedback: HapticFeedback?
|
||||||
private let confettiDuration: Double = 5.0
|
private let confettiDuration: Double = 5.0
|
||||||
|
|
||||||
private let purchaseButtonBottomOffset: CGFloat = 50.0
|
@Environment(\.sizeCategory) var sizeCategory: ContentSizeCategory
|
||||||
|
private var purchaseButtonBottomOffset: CGFloat {
|
||||||
|
let baseOffset: CGFloat = 50.0
|
||||||
|
let sizeMultiplier = UIFontMetrics.default.scaledValue(for: 1.0)
|
||||||
|
return baseOffset * sizeMultiplier
|
||||||
|
}
|
||||||
|
|
||||||
private var features: [SGProFeature] {
|
private var features: [SGProFeature] {
|
||||||
return [
|
return [
|
||||||
@ -615,7 +623,9 @@ struct SGPayWallView: View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private func showDetailsForFeature(_ featureId: SGProFeatureId) {
|
private func showDetailsForFeature(_ featureId: SGProFeatureId) {
|
||||||
|
if #available(iOS 14.0, *) {
|
||||||
showDetails = true
|
showDetails = true
|
||||||
|
} // pagination is not available on iOS 13
|
||||||
}
|
}
|
||||||
|
|
||||||
private func updateSelectedProduct() {
|
private func updateSelectedProduct() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user