How to addsubview without storyboard and make it key and visible

I know how to add Admob as sub view but the main screen will be blocked by the Admob subview. I’m think to add a small new view above the Admob subview to solve the problem. However, I cannot locate any reference as to add a subview without storyboard. Please advise. Thanks.

I found a direction from another post below: