I\'m kinda new to Objective-C and iPhone development and I\'ve come across a problem when trying to center the text in a table cell. I\'ve searched google but the solutions
Here is what works for me...
NSString *text = @"some text";
CGSize size = [text sizeWithAttributes:@{NSFontAttributeName:SOME_UIFONT}];
[cell setIndentationLevel:1];
[cell setIndentationWidth:(tableView.frame.size.width - size.width)/2.0f];
cell.textLabel.font = SOME_UIFONT;
[cell.textLabel setText:text];