Код: Выделить всё
import SwiftUI
struct GradientTintScrollView: View {
var body: some View {
ZStack {
// Background sits outside, untouched
LinearGradient(
colors: [.purple, .pink],
startPoint: .top,
endPoint: .bottom
)
.ignoresSafeArea()
// Only this group gets the tint effect
ZStack {
ScrollView {
VStack(spacing: 20) {
ForEach(0..
Подробнее здесь: [url]https://stackoverflow.com/questions/79774779/how-do-i-get-a-blending-mode-to-apply-to-my-scrollview-while-not-affecting-the-b[/url]
Мобильная версия