Type Safely

Type Safely

Share this post

Type Safely
Type Safely
Use Header and Footer For a List Section
Copy link
Facebook
Email
Notes
More

Use Header and Footer For a List Section

Daily Coding Tip 239

Type Safely's avatar
Type Safely
Jan 31, 2023
∙ Paid

Share this post

Type Safely
Type Safely
Use Header and Footer For a List Section
Copy link
Facebook
Email
Notes
More
Share
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…

Keep reading with a 7-day free trial

Subscribe to Type Safely to keep reading this post and get 7 days of free access to the full post archives.

Already a paid subscriber? Sign in
© 2025 Type Safely
Privacy ∙ Terms ∙ Collection notice
Start writingGet the app
Substack is the home for great culture

Share

Copy link
Facebook
Email
Notes
More