我需要在设备旋转时更改文本的单元格。这是我的代码:
- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
{
[self.lista beginUpdates];
NSIndexPath *durPath = [NSIndexPath indexPathForRow:0 inSection:0];
NSArray *paths = [NSArray arrayWithObjects:durPath, nil];
UITableViewCell *celda = [self.lista cellForRowAtIndexPath:
[NSIndexPath indexPathForRow:0 inSection:0]];
celda.textLabel.text = @"new text for the cell";
[self.lista reloadRowsAtIndexPaths:paths withRowAnimation:UITableViewRowAnimationNone];
[self.lista endUpdates];
}
什么也没有发生。怎么了?