I have a UIViewController with two UITableView like this

when the interface rotate I would like this interface

but with Autolayout I can't be able to achieve this.
Here the constraints for table view A:
- Leading space
- Bottom space
- Top space
- Align center Y
and for table view B
- Trailing space
- Bottom space
- Top space
- Align center Y
and here the result:

If I add the constraint horizontal space between table view to 0 here is the result

How can I solve it without setting programmatically the frame? I wanna using Autolayout.
Solution based on @sha answer
Constraints for table view A:
- Leading space
- Bottom space
- Top space
- Width equals to B
- Horizontal space from B = 0
and for table view B
- Trailing space
- Bottom space
- Top space
- Width equals to A
- Horizontal space from A = 0