Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Storyboard app run on iOS 7 OK but Navbar shift view on iOS 6.1

While rebuilding my project with the new Xcode 5 released yesterday, I was disappointed to see my storyboard view controller shaken up.

After many attempts to fix things, I must conclude I'm stuck with one remaining issue: Navigation View Controller makes the navigation bar overlaps with the content of the view. Doing so, the app is ok on a iOS 7 device (no overlapping), but with a iOS 6.1 device, the navbar overlaps.

I ran a sample project from FlatUI to crosscheck the issue, and they have the same issue. Any idea please?

like image 818
Stéphane de Luca Avatar asked Sep 11 '13 19:09

Stéphane de Luca


2 Answers

You are facing problem because of co-ordinate system, co-ordinate system of iOS 6 & iOS 7 are different iOS 7 Uses by default translucent properties.

Try putting this Code in viewDidLoad

if (floor(NSFoundationVersionNumber) > NSFoundationVersionNumber_iOS_6_1)
{
     self.edgesForExtendedLayout=NO;
}
like image 160
Krunal Avatar answered Oct 02 '22 07:10

Krunal


I think this is because of co-ordinate system of iOS 6 & iOS 7

Kindly check following two images.

iOS 6:

enter image description here

iOS 7 :

enter image description here

like image 33
imDeveloper Avatar answered Oct 02 '22 06:10

imDeveloper