Can a standard accessory view be in a different position within a UITableViewCell?

前端 未结 11 1042
谎友^
谎友^ 2020-12-05 09:57

I want my accessory to be in a slightly different place than normal. Is it possible? This code has no effect:

cell.accessoryType =  UITableViewCellAccessoryD         


        
11条回答
  •  [愿得一人]
    2020-12-05 10:15

    No, you cannot move where the accessory view is. As an alternative you can add a subview like the following;

    [cell.contentView addSubview:aView];
    

    Also, by setting the accessoryView property equal to something, the accessoryType value is ignored.

提交回复
热议问题