title: Why is titleForHeaderInSection method called multiple times?
body: <p>I have a simple project that has a view and this view contains only one table view inside. The table view is grouped and has one simple prototype cell. </p>
  
  <p>I have implemented <code>titleForHeaderInSection</code> method to customize the section title. When I look at the debug output I saw that the app was printing log statement in the <code>titleForHeaderInSection</code> multiple times.  Sometimes two, sometimes three times. Does anyone know why? </p>
  
  <p>Here is my code:</p>
  
  <pre><code>@implementation ViewController
  
  - (void)viewDidLoad {
      [super viewDidLoad];
  }
  
  - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
      return 5;
  }
  
  - (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section {
      NSString *initialTitle = @"A title";
      NSLog(@"titleForHeaderInSection: %@", initialTitle);
      return initialTitle;
  }
  
  - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
      UILabel *myLabel = [UILabel new];
      myLabel.frame = CGRectMake(20, 20, 320, 20);
      myLabel.font = [UIFont boldSystemFontOfSize:20];
      myLabel.text = @"Test";
      UIView *headerView = [UIView new];
      [headerView addSubview:myLabel];
      return headerView;
  }
  
  - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
      UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"TestCell" forIndexPath:indexPath];
      return cell;
  }
  
  @end
  </code></pre>
  
  <p>Here is the debug output:</p>
  
  <pre><code>2014-12-29 14:57:30.806 TestTitleForHeaderInSection[5212:118874] titleForHeaderInSection: A title
  2014-12-29 14:57:30.812 TestTitleForHeaderInSection[5212:118874] titleForHeaderInSection: A title
  2014-12-29 14:57:30.812 TestTitleForHeaderInSection[5212:118874] titleForHeaderInSection: A title
  </code></pre>
  
  <p>I have also noticed that <code>numberOfRowsInSection</code> method is called multiple times.</p>