reloadRowsAtIndexPaths什么都不做

时间:2012-11-01 23:42:39

标签: objective-c

我需要在设备旋转时更改文本的单元格。这是我的代码:

- (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];

}

没有任何反应。怎么了?

0 个答案:

没有答案