Eureka: Update header view when section is removed

Created on 19 Jun 2017  路  3Comments  路  Source: xmartlabs/Eureka

I have a list of sections with a title and a remove button inside the header view. Like so:

"Title Section 1" ---- [button]
"Title Section 2" ---- [button]
"Title Section 3" ---- [button]
...
and so on.

Every time the button is pressed, it removes that section.

Is there a way to refresh the titles and target actions from the header views after that happens?

Eureka: 3.0.0
iOS: 10.2
Xcode: 8.3.3

awaiting response question

Most helpful comment

Hi @fpena, you can iterate through all your sections updating their headers title. You can use the code snippet below as guide:

self.form.allSections.enumerated().forEach { ind, sect in
    sect.header?.title = "Title Section \(ind)"
    sect.reload()
}

Otherwise, we use our GitHub project for bug reports and feature requests. In the future, you should open questions like this on Stack Overflow and tag eureka-forms.

All 3 comments

Hi @fpena, you can iterate through all your sections updating their headers title. You can use the code snippet below as guide:

self.form.allSections.enumerated().forEach { ind, sect in
    sect.header?.title = "Title Section \(ind)"
    sect.reload()
}

Otherwise, we use our GitHub project for bug reports and feature requests. In the future, you should open questions like this on Stack Overflow and tag eureka-forms.

Ok. Thanks @m-revetria !

Closing this, seems that it's solved.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

smileatom picture smileatom  路  3Comments

zoul picture zoul  路  3Comments

allanrojas picture allanrojas  路  3Comments

Tomas1405 picture Tomas1405  路  3Comments

thlbaut picture thlbaut  路  3Comments