In the interface builder, make sure that you set the scroll bar navigation and tabs. This should be the first list of options on the first tab in the property view of the interface builder. This will force your view to simulate the amount of space that it has when loading into the view.
From there, you can also select a preview video option. The interface designer also allows you to set the resizing options for the view. If subview your addition was not created in the interface builder, you will need to specify these parameters manually.
Lastly, make sure that you add the preview to the correct view, not the tab bar controller or navigation controller.
Itβs best to make sure that subview your padding sizes are suitable for the amount of space created with CGRect.
Chris source share