Reputation: 7443
When I instantiate a view Controller through didSelectRowAtIndex
method:
let vc = self.storyboard?.instantiateViewControllerWithIdentifier("About") as About
self.navigationController?.pushViewController(vc, animated: true)
break;
A part of the About
View Controller gets below the navigation Bar. How Do I solve this in Swift?
Upvotes: 2
Views: 2526
Reputation: 9356
Try setting the edges for the extended layout to none.
Swift 2
self.edgesForExtendedLayout = UIRectEdge.None
Swift 3+
self.edgesForExtendedLayout = []
Swift 4+
self.edgesForExtendedLayout = .all
Upvotes: 7