You will also remove the scrollbar with the above solution. To solve this, you may ask whether the subview about to be removed is a UIImageView instance. Obviously, you will need to do more checks if you happen to have your own UIImageViews in the scroll view.