iPhone UITableViewCell: repositioning the textLabel

You can create a subclass for UITableViewCell and customize de textLabel frame. See that answer: Labels aligning in UITableViewCell. It’s works perfectly to me.

It’s my subclass

#import "UITableViewCellFixed.h"
@implementation UITableViewCellFixed
- (void) layoutSubviews {
     [super layoutSubviews];
     self.textLabel.frame = CGRectMake(0, 0, 320, 20);
}
@end

It’s my UITableViewControllerClass:

UITableViewCellFixed *cell = (UITableViewCellFixed *) [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
    cell = [[[UITableViewCellFixed alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
}

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)