You should set the autoresizingMask
:
webVPrg.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
to make the view automatically adapt its size according to its superview's. You will possibly need to do the same with your self.view
as well.