I have a subclassed UITableViewCell.
I need to dynamically change the frame of a UILabel.
Here\'s what I\'ve done:
- (UITableViewCell *)table
May be this relates to fact of reusing cell. Try this
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"messageCell";
MessageCell *cell = (MessageCell*) [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
if(cell == nil)
{
cell = [[[MessageCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdentifier]autorelease];
}
cell.Content.Text = @"Content!";
[cell.Content setFrame:CGRectMake(0, 0, 10, 10)];
return cell;
}