ios 7 UiView frame issue

PK86 picture PK86 · Aug 16, 2013 · Viewed 27.3k times · Source

I am running same app in iOS6 and iOS7 which has NavigationBar.It runs well on iOS6, but in iOS7, all view is little bit up like it is not considering the Navigation bar at all.

I have tried changing topbar property in simulated metrics option but it doesnt work. It considers button's position from NavigationBar in iOS6, but in iOS7, it considers it from top of the screen.

What is the reason for it?

Thanks in advance.

iOS 6 Screenshot

iOS 7 Screenshot

Answer

sinh99 picture sinh99 · Sep 5, 2013

You should use below line for fix it in your view.

 self.edgesForExtendedLayout = UIRectEdgeNone;