I have a programmatically created UIScrollView, and I am creating it as the size of the UIView behind it. In
UIScrollView *scrollView= [[UIScrollView alloc] initWithFrame:mainView.bounds];
//mainView being the UIView behind
scrollView.bounds = mainView.bounds;
You need to set the scrollview's frame not it's bounds
scrollView.frame = mainView.bounds;
Or better yet if you set up the correct autoresizing masks/constraints it will resize automatically.