WWDC22 SALE: Save 50% on all my Swift books and bundles! >>

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.

   

Save 50% in my Black Friday sale.

SAVE 50% To celebrate WWDC22, all our books and bundles are half price, so you can take your Swift knowledge further without spending big! Get the Swift Power Pack to build your iOS career faster, get the Swift Platform Pack to builds apps for macOS, watchOS, and beyond, or get the Swift Plus Pack to learn advanced design patterns, testing skills, and more.

Save 50% on all our books and bundles!

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.