アプリでカスタムを使用していてUITableViewCell、「スワイプして削除」ボタンのフレームを調整しようとしています。
これは私がしていることです:
- (void)layoutSubviews {
    [super layoutSubviews];
    if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) return;
    [UIView beginAnimations:nil context:NULL];
    [UIView setAnimationBeginsFromCurrentState:YES];
    [UIView setAnimationDuration:0.0f];
    for (UIView *subview in self.subviews) {
        if ([NSStringFromClass([subview class]) isEqualToString:@"UITableViewCellDeleteConfirmationControl"]) {
            CGRect newFrame = subview.frame;
            newFrame.origin.x = newFrame.origin.x - 25;
            subview.frame = newFrame;
        } else if ([NSStringFromClass([subview class]) isEqualToString:@"UITableViewCellEditControl"]) {
            CGRect newFrame = subview.frame;
            newFrame.origin.x = newFrame.origin.x - 25;
            subview.frame = newFrame;
        }
    }
}
それは新しい位置に現れます、それは素晴らしいです。しかし、ボタンから離れてクリックして消えると、ボタンが突然左に約10ポイント移動したように見え、その後削除されます。
なぜこれが起こっているのですか、どうすれば修正できますか?