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

前端 未结 11 1045
谎友^
谎友^ 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:25

    I was able to change the accessory view's frame by simply doing this in my custom cell subclass.

    CGRect adjustedFrame = self.accessoryView.frame;
    adjustedFrame.origin.x += 10.0f;
    self.accessoryView.frame = adjustedFrame;
    

提交回复
热议问题