Skip to content

How to open by default 2 sections(Headers) when view loads? #23

@narasimhanallamsetty

Description

@narasimhanallamsetty

Hi,

This is very nice tutorial,exactly what I was looking for. But I need to open 2 sections(Headers) when view loads. Right now I am able to open one section when view loads. How can I open 2 or more sections when view loads.

When I added the below lines section one is opened with animation
if (!self.startsClosed && [selectionIndexes count] == 0) {
[self setSelectedIndex:0];
}

In the same way I tried for second section, but it's not working for me. May be I need to make changes some where else.
if (!self.startsClosed &&[selectionIndexes count] == 2) {
[self setSelectedIndex:2];
}

Please help me out. Once again thanks for your great work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions