mirror of
https://github.com/signalapp/Signal-iOS.git
synced 2025-12-05 01:10:41 +00:00
Use safe area bar for pinned footers on iOS 26
This commit is contained in:
@@ -21,10 +21,40 @@ public struct ScrollableContentPinnedFooterView<
|
||||
}
|
||||
|
||||
public var body: some View {
|
||||
#if compiler(>=6.2)
|
||||
if #available(iOS 26, *) {
|
||||
iOS26Body
|
||||
} else {
|
||||
iOS18Body
|
||||
}
|
||||
#else
|
||||
iOS18Body
|
||||
#endif
|
||||
}
|
||||
|
||||
#if compiler(>=6.2)
|
||||
@available(iOS 26, *)
|
||||
private var iOS26Body: some View {
|
||||
ScrollView {
|
||||
scrollableContent
|
||||
}
|
||||
.safeAreaBar(edge: .bottom) {
|
||||
VStack(spacing: 0) {
|
||||
pinnedFooter
|
||||
}
|
||||
.padding(.top, 24)
|
||||
.padding(.bottom, 12)
|
||||
}
|
||||
.scrollBounceBehavior(.basedOnSize)
|
||||
}
|
||||
#endif
|
||||
|
||||
private var iOS18Body: some View {
|
||||
VStack(spacing: 0) {
|
||||
ScrollView {
|
||||
scrollableContent
|
||||
}
|
||||
.scrollBounceBehaviorIfAvailable(.basedOnSize)
|
||||
|
||||
Spacer().frame(height: 24)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user