달력

10

« 2024/10 »

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31

How to Adjust “Delete” UIButton for UITableView deletion state

- (void)didTransitionToState:(UITableViewCellStateMask)state
{
    [super willTransitionToState:state];
    if (state == UITableViewCellStateShowingDeleteConfirmationMask)
    {
        for (UIView *subview in self.subviews)
        {
            if ([NSStringFromClass([subview class]) isEqualToString:@"UITableViewCellDeleteConfirmationControl"])
            {
                UIView *deleteButtonView = (UIView *)[subview.subviews objectAtIndex:0];
                CGRect frame = deleteButtonView.frame;
                frame.origin.x = {NEW X ORIGIN};
                frame.origin.y = {NEW Y ORIGIN};
                deleteButtonView.frame = frame;
            }
         }
    }
}
:
Posted by netkorea