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 に答える