NEW: My new book Pro SwiftUI is out now – level up your SwiftUI skills today! >>

Form vs ScrollView

Forums > SwiftUI

Both Form and ScrollView gives you to add other views inside them and the ability to scroll. So, what is the difference between them?

   

From the developer documentation with examples Form. Form also has a specific behaviour and styles for the embedded views. Form adapts the embedded user controls regarding the used operating system.

ScrollView lets you enter any view you like. Additionally, you can scroll vertically (Form doesn't).

As you can see in the screenshots of Form they have different use cases.

   

Think @Hatsushira meant to say horizontal.

ScrollView lets you enter any view you like. Additionally, you can scroll vertically (Form doesn't).

PS No Screenshots!

   

Yes, I did. Thank you. Screenshots are on the Apple site with the examples.

   

Thanks.

   

Hacking with Swift is sponsored by Play

SPONSORED Play is the first native iOS design tool created for designers and engineers. You can install Play for iOS and iPad today and sign up to check out the Beta of our macOS app with SwiftUI code export. We're also hiring engineers!

Click to learn more about Play!

Sponsor Hacking with Swift and reach the world's largest Swift community!

Reply to this topic…

You need to create an account or log in to reply.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.