How to set contentInset of a ScrollView in SwiftUI

Just add a padding to the VStack embedded inside the ScrollView.

Using paddings with the embedded stacks provides the same behaviour as content insets.

ScrollView(showsIndicators: false) {
    VStack(spacing: 10) {
        // Some content //
    }
    .padding(.bottom, 200)    // Choose a value that works for you
}

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)