I did some digging, and now it seems that the login view doesn't set the width of its subviews correctly. The UIView I add to the view controller has the correct width.