Safe area fix guide for earlier versions of iOS

Safe area layout is introduced in iOS11 but what can we do if we are supporting < iOS 11 and we have a xib view that is initiated in a ViewController and somehow the upper part of the xib view appears behind the NavigationBar??? To fix this, simply add this line in your viewDidLoad.

self.edgesForExtendedLayout = UIRectEdge.init(rawValue: 0)

For more information visit EdgesForExtendedLayout at Apple.