{"action":"created","issue":{"url":"https://api.github.com/repos/clearsightstudio/ProMotion/issues/565","labels_url":"https://api.github.com/repos/clearsightstudio/ProMotion/issues/565/labels{/name}","comments_url":"https://api.github.com/repos/clearsightstudio/ProMotion/issues/565/comments","events_url":"https://api.github.com/repos/clearsightstudio/ProMotion/issues/565/events","html_url":"https://github.com/clearsightstudio/ProMotion/pull/565","id":48323734,"number":565,"title":"Adds header_will_display method to PM::TableScreen","user":{"login":"markrickert","id":139261,"avatar_url":"https://avatars.githubusercontent.com/u/139261?v=3","gravatar_id":"","url":"https://api.github.com/users/markrickert","html_url":"https://github.com/markrickert","followers_url":"https://api.github.com/users/markrickert/followers","following_url":"https://api.github.com/users/markrickert/following{/other_user}","gists_url":"https://api.github.com/users/markrickert/gists{/gist_id}","starred_url":"https://api.github.com/users/markrickert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markrickert/subscriptions","organizations_url":"https://api.github.com/users/markrickert/orgs","repos_url":"https://api.github.com/users/markrickert/repos","events_url":"https://api.github.com/users/markrickert/events{/privacy}","received_events_url":"https://api.github.com/users/markrickert/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/clearsightstudio/ProMotion/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/clearsightstudio/ProMotion/labels/planned","name":"planned","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2014-11-10T22:38:11Z","updated_at":"2015-01-21T20:06:32Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/clearsightstudio/ProMotion/pulls/565","html_url":"https://github.com/clearsightstudio/ProMotion/pull/565","diff_url":"https://github.com/clearsightstudio/ProMotion/pull/565.diff","patch_url":"https://github.com/clearsightstudio/ProMotion/pull/565.patch"},"body":"If defined in your subclass, it will call:\r\n\r\n`header_will_display`, `header_will_display(view)` or `header_will_display(view, section)`\r\n\r\nThis is so that you can modify the view of a header before it is displayed. This is commonly done to do things like change the background or text color of the default header view like so:\r\n\r\n```ruby\r\ndef tableView(tableView, willDisplayHeaderView:view, forSection:section)\r\n  view.tintColor = UIColor.redColor #  Background \r\n  view.textLabel.setTextColor(UIColor.blueColor) # Text Color\r\nend\r\n```\r\n\r\nThis new ProMotion way would be:\r\n\r\n```ruby\r\ndef header_will_display(view) # Don't need the section index in this example\r\n  view.tintColor = UIColor.redColor #  Background \r\n  view.textLabel.setTextColor(UIColor.blueColor) # Text Color\r\nend\r\n```"},"comment":{"url":"https://api.github.com/repos/clearsightstudio/ProMotion/issues/comments/70911429","html_url":"https://github.com/clearsightstudio/ProMotion/pull/565#issuecomment-70911429","issue_url":"https://api.github.com/repos/clearsightstudio/ProMotion/issues/565","id":70911429,"user":{"login":"ryanlntn","id":1944151,"avatar_url":"https://avatars.githubusercontent.com/u/1944151?v=3","gravatar_id":"","url":"https://api.github.com/users/ryanlntn","html_url":"https://github.com/ryanlntn","followers_url":"https://api.github.com/users/ryanlntn/followers","following_url":"https://api.github.com/users/ryanlntn/following{/other_user}","gists_url":"https://api.github.com/users/ryanlntn/gists{/gist_id}","starred_url":"https://api.github.com/users/ryanlntn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryanlntn/subscriptions","organizations_url":"https://api.github.com/users/ryanlntn/orgs","repos_url":"https://api.github.com/users/ryanlntn/repos","events_url":"https://api.github.com/users/ryanlntn/events{/privacy}","received_events_url":"https://api.github.com/users/ryanlntn/received_events","type":"User","site_admin":false},"created_at":"2015-01-21T20:06:32Z","updated_at":"2015-01-21T20:06:32Z","body":"Staged for release on the [version-2.3](https://github.com/clearsightstudio/ProMotion/tree/version-2.3) branch."}}