Uitableview 使用swift旋转UIContextualAction

Uitableview 使用swift旋转UIContextualAction,uitableview,swift4,rotatetransform,uicontextualaction,Uitableview,Swift4,Rotatetransform,Uicontextualaction,我试图进行聊天,我找到了一种方法,使tableView看起来像是用下面的代码行从下到上填充的: //Swipe the tableView tableView.transform = CGAffineTransform(rotationAngle: (-.pi)) tableView.scrollIndicatorInsets = UIEdgeInsetsMake(0, 0, 0, tlView.bounds.size.width - 10) //Swipe the cells cell.tra

我试图进行聊天,我找到了一种方法,使tableView看起来像是用下面的代码行从下到上填充的:

//Swipe the tableView
tableView.transform = CGAffineTransform(rotationAngle: (-.pi))
tableView.scrollIndicatorInsets = UIEdgeInsetsMake(0, 0, 0, tlView.bounds.size.width - 10)
//Swipe the cells
cell.transform = CGAffineTransform(rotationAngle: (-.pi))
这很好,但是当您使用函数trailingswipeactionscoconfigurationforrowat应用一个操作时,问题就出现了,因为所有内容都是颠倒的,如下图所示。正如您所看到的,de“Details”按钮位于右侧(它必须位于左侧),并且倒置

这是生成动作的函数,但UIContextualAction没有函数转换,因此无法将其作为tableview和单元格旋转

func tableView(_ tableView: UITableView, trailingSwipeActionsConfigurationForRowAt indexPath: IndexPath) -> UISwipeActionsConfiguration? {

        let answerAction = UIContextualAction(style: .normal, title:  "Details", handler: { (ac:UIContextualAction, view:UIView, success: @escaping (Bool) -> Void) in
            success(true)
        })

        answerAction.backgroundColor = UIColor.white.withAlphaComponent(0)

        let configuration = UISwipeActionsConfiguration(actions: [answerAction])
        configuration.performsFirstActionWithFullSwipe = true

        return configuration

}
那么,我如何旋转呢?或者,还有什么其他方法可以让tableView从底部填充到顶部

非常感谢你的帮助