I trying to make a chat, I find the way to make the tableView looks like you are filling it from bottom to top with the line of code below:
//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))
That works nice but the problem appears when you apply an action with the function trailingSwipeActionsConfigurationForRowAt, because everything show upside down, like the image below. As you can see de "Details" button its on the right side (it must be on left side) and its upside down.
This is the function for make the action, but a UIContextualAction don't have the function transform, so, can't rotate it as the tableview and cell.
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
}
So, how can I rotate? or What other way I can make the tableView fill from botton to top?
Thanks a lot for the help!