Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8659035
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T15:54:26+00:00 2026-06-12T15:54:26+00:00

I have a CollectionView using the standard FlowLayout class with horizontal scrolling and a

  • 0

I have a CollectionView using the standard FlowLayout class with horizontal scrolling and a header and footer in each section.

Now there’s zero pixels between the footer and the header views (i.e between the sections). I’d like to add a little spacing between them, but not above the first section or after the last one. So I can’t just add that space in the header and footer views itself.

I would have expected something like “interSectionSpacing”, but apparently there is no such setting. Any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T15:54:28+00:00Added an answer on June 12, 2026 at 3:54 pm

    So it turns out there is no setting for that. This is what I ended up with:

    I set the content of my header view to be aligned to the bottom of the header view itself, so it seems to have the same visible height, even if I make the header view taller than its content (auto layout makes this really easy).

    Then I set the height of the header depending on the section index in this delegate method of UICollectionViewFlowLayout:

    
    #define kHeaderHeight 42
    #define kInterSectionMargin 8
    
    - (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout referenceSizeForHeaderInSection:(NSInteger)section
    {
        if (section == 0) {
            return CGSizeMake(0, kHeaderHeight);
        }
        return CGSizeMake(0, kHeaderHeight + kInterSectionMargin);
    }
    

    Now there’s a little space between the sections, but not before the first section.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a view that gets used in each of my CollectionView's items. I
Both ArrayController and CollectionView have same functionality to render 'content' array using template, except
I have a NSCollectionView that I populate using [collectionView setContent:data]; where data is a
I have a collectionview that I am using to show thumbnails. I want it
I have collectionView in my wpf application. For sorting purpose, I add four SortDescriptions
have written this little class, which generates a UUID every time an object of
I'm making a horizontal picker by using a UICollectionView . It's simple enough: A
I have an application written using Prism 4.0. It has lots of Views which
I'm trying to use multiple filters on a CollectionView - using this approach: http://bea.stollnitz.com/blog/?p=32
I'm using c# in combination of WPF. I've used a CollectionView with a single

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.