0

在我的应用程序中,我有一些菜单点,它们被禁用以供用户交互。

   cell.userInteractionEnabled = FALSE;

登录后,我想重新启用其中一些单元格。

这个片段正在工作一半:

   NSIndexPath *editUsersPath = [NSIndexPath indexPathForRow:0 inSection:1];
        [self.tableView cellForRowAtIndexPath:importPath].userInteractionEnabled = YES;
        [self.tableView cellForRowAtIndexPath:importPath].accessoryType =         UITableViewCellAccessoryDisclosureIndicator;
        [self.tableView cellForRowAtIndexPath:importPath].textLabel.textColor = [UIColor blackColor];

但最后一行代码不起作用 - 文本像以前一样是灰色的。

4

1 回答 1

0

您是否在更改后进行任何单元格重绘?也许您可以尝试调用 setNeedsLayout 来重绘单元格。

于 2011-11-01T14:39:54.843 回答