So I have a UIScrollView inside a UIView of a UIViewController in which I added a UIView inside it, and I wanted it to always stick at the bottom regardless of the orientation changes. So I had the following:

The issue is that when I rotate into landscape, the scroll view content size height is definitely going to be bigger than the frame height, and therefore it scrolls down. However this UIView that I want to stick at the bottom doesn’t stick. How do I make it so that it always stick to the bottom regardless of the orientation changes.
When I disabled UIScrollView autoresize subviews, this UIView sticks to the bottom, but the width doesn’t adjust when rotated
You will have to adjust frame according to
orientationssee below example –