Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating header text #68

Closed
Recouse opened this issue Feb 1, 2018 · 7 comments
Closed

Updating header text #68

Recouse opened this issue Feb 1, 2018 · 7 comments

Comments

@Recouse
Copy link
Contributor

Recouse commented Feb 1, 2018

Can't update section header text. I tried:

someHeader.text = "New Title".uppercased()

and:

someHeader.configure { view in
    view.text = "New Title".uppercased()
}

also tried:

someHeader.viewUpdate { view in
    view.text = "New Title".uppercased()
}
@ZacharyKhan
Copy link
Collaborator

Please reference the demo project provided. There’s an example in EditProfieViewController at the bottom of the configure() function that shows how to set section header text.

@Recouse
Copy link
Contributor Author

Recouse commented Feb 2, 2018

It works on creation. But doesn't work for updating.

@ZacharyKhan
Copy link
Collaborator

Ahh I see, I’m going to assign this one to @ra1028. He knows best with this stuff.

@Recouse
Copy link
Contributor Author

Recouse commented Feb 2, 2018

I've found in the source that it's possible by calling update() method after text changing. Like this:

someHeader.configure {
    $0.text = "New title"
    $0.update()
}

@ZacharyKhan
Copy link
Collaborator

Does this code work for you?

@Recouse
Copy link
Contributor Author

Recouse commented Feb 2, 2018

Yep. But it will be better if this released in a new method for title changing.

@ZacharyKhan
Copy link
Collaborator

I agree, maybe something like this:

SomeHeader.update(withText text:String)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants