Thank you for this very useful and flexible implementation. I have encountered a problem when using it in landscape mode. With the keyboard visible the direction is typically .up, and the list ends up being higher than the available space and partially of the screen.
In line 302 (height calculation for direction .up) shouldn't it simply be
let tableHeight = min(tableView.contentSize.height, frame.origin.y )
or, with a small margin on top for better looks
let tableHeight = min(tableView.contentSize.height, frame.origin.y - topMargin )
Thank you for this very useful and flexible implementation. I have encountered a problem when using it in landscape mode. With the keyboard visible the direction is typically
.up
, and the list ends up being higher than the available space and partially of the screen.In line 302 (height calculation for direction .up) shouldn't it simply be
let tableHeight = min(tableView.contentSize.height, frame.origin.y )
or, with a small margin on top for better looks
let tableHeight = min(tableView.contentSize.height, frame.origin.y - topMargin )