X Pahadi
X Pahadi

Reputation: 7443

Navigation Bar covers some part of view at Top

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?

enter image description here

Upvotes: 2

Views: 2526

Answers (1)

iAnurag
iAnurag

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

Related Questions