From Apple Docs,
Any user interface screen that includes a banner view must be managed by a view controller (a class that subclasses UIViewController).
This allows a triggered action to cover your user interface with an additional advertising screen. Whenever a banner view is visible, it must be part of a view hierarchy that is attached to the view property of a view controller.
Your second view controller should be the child of the Main View controller.
For More details Please Refer HERE