Type Safely

Type Safely

Use Header and Footer For a List Section

Daily Coding Tip 239

Type Safely's avatar
Type Safely
Jan 31, 2023
∙ Paid
a couple of birds sitting on top of a tree branch
Photo by Joseph Sharp on Unsplash

It’s possible to have a header and a footer for every Section in a List or Form.

This is the initialiser I’ll be using:

extension Section where Parent : View, Content : View, Footer : View {
    init(header: Parent, footer: Footer, content: () -> Content)
}

Notice that the header is called Parent by Apple, but the footer is…

User's avatar

Continue reading this post for free, courtesy of Type Safely.

Or purchase a paid subscription.
© 2026 Type Safely · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture