BLACK FRIDAY 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.

   

Hacking with Swift is sponsored by Guardsquare

SPONSORED AppSweep by Guardsquare helps developers automate the mobile app security testing process with fast, free scans. By using AppSweep’s actionable recommendations, developers can improve the security posture of their apps in accordance with security standards like OWASP.

Learn more

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

Archived topic

This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.

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.