This is an example project of how to change a header-in-section color during runtime.
https://medium.com/@ohadmaor/handling-visible-headers-in-section-using-swift-338621106d87
If you find an issue you are welcome to fix it by a pull request. Thanks.