Your code looks fine. Have you set up correct constraints on the view's height and width? You could try using the view debugger get a better idea of how iOS is laying out the view.