Skip to content

how to set the linespacing of items in the first level #335

@walkerwzy

Description

@walkerwzy

New issue checklist

General information

how to set minimumLineSpacing and inset of the main view?

see the picture:
a0519489-e3cb-46eb-9a1e-1d147366897f

I can set those in a IGListSectionController, use

- (instancetype)init {
    if((self = [super init])) {
        self.minimumInteritemSpacing = 10;
        self.minimumLineSpacing = 10;
        self.inset = UIEdgeInsetsFromString(@"{10,10,10,10}");
        self.supplementaryViewSource = self;
    }
    return self;
}

but it's only affect items in this section, I want to the whole section can have original linespacing property to set but can find where to set.

my demo datasource:

[
 [1],
 [2],
 [1,2,3,...9]
]

I want to have 3 main block,
the 3 main block have a 15pt line spacing, and 10pt inset to main window's view
and the third block have 3*3 item.

the third block is ok, I can set the sectionControllers lineSpacing and interItemSpacing, but the main block's line spacing I can't find how to set.
I can only use a ** supplementary** to simulate a spacing, but I'm sure it's not designed for this.

From your example, I found that the "EmptyViewController" look's like what I need, but it's by setting a inset to accomplish this , and I now use this way. is there an original way to use line spacing in first level cells? since the first level cells it's also implement by a flowlayout

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions