LoginSignup
6
6

More than 5 years have passed since last update.

UITableViewCell の Reorder-Control(並べ替え用ノブ)をカスタマイズ

Last updated at Posted at 2012-06-20
Hoge.m

// UITableViewDelegate
- (void)tableView:(UITableView *)tableView 
  willDisplayCell:(UITableViewCell *)cell 
forRowAtIndexPath:(NSIndexPath*)indexPath
{
    // セルの子 view を走査…
    for (UIView *view in cell.subviews)
    {
        // "UITableViewCellReorderControl" という Undocumented Class ? があの並べ替え用「ノブ」
        if([NSStringFromClass([view class]) isEqualToString:@"UITableViewCellReorderControl"])
        {
            for (UIImageView *knobView in view.subviews)
            {
                // ノブのアイコンを表示しているのは単なる UIImageView
                if([knobView isKindOfClass:[UIImageView class]])
                {
                    // nil にすれば「三」のようなアイコンを消せる
                    UIImage *image = nil;
                    [knobView setImage:image];

                    break;
                }
            }

            break;
        }
    }

}

6
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
6