Use Auto Layout and pin your view to Top Layout Guide, or use the new Safe Area Layout Guides. To enable it, in your storyboard's File inspector tick the following option.
As an example I have used gray image view:
As you can see below, it does not overlap status bar: