You need to manage X and Y parameters of frame something like
let height = 50
frame.x = view.frame.y — height.
frame.height = height
I have not tried above one but you get the idea, right?
Let me know if it works or not. I will help you if you don’t get it.