How to change position of the text in tableview section? I use viewForHeaderInSection:Section and i create there somwthing like this:
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 300, 30)];
label.backgroundColor = [UIColor blackColor];
label.textColor = [UIColor whiteColor];
label.font = [UIFont fontWithName:@"Gotham-Bold" size:17.0f];
id <NSFetchedResultsSectionInfo> sectionInfo = [[self.comlpetedFetchedResultsController sections] objectAtIndex:section];
label.text = [@" " stringByAppendingString:[sectionInfo name]];
return label;
}
It doesnt matter what size is the parameters in UILabel frame, i always get the same result:

How can i center text in UILabel vertically?
Thanks
Put the label in a UIView then return the view:
Make sure you implement the following method:
otherwise your view will simply be on top of the cells.