Skip to content
Discussion options

You must be logged in to vote

QuickLayout doesn’t ship a custom ScrollView type – you still use UIScrollView, and let QuickLayout drive the layout inside the scroll view.

To replicate your SwiftUI example, you’d usually do something like this with QuickLayout + UIKit:

import UIKit
import QuickLayout

// This view is the "VStack { ViewA; ViewB; ViewC }" part.
@QuickLayout
final class ScrollContentView: UIView {

    let viewA = UIView()
    let viewB = UIView()
    let viewC = UIView()

    var body: Layout {
        VStack(spacing: 8) {
            viewA
            viewB
            viewC
        }
        .padding(.horizontal, 16)
        .padding(.vertical, 16)
    }
}

Then embed that inside a UIScrollView:

final c…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@xia0m1ng
Comment options

Answer selected by xia0m1ng
Comment options

You must be logged in to vote
1 reply
@xia0m1ng
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants