0

I am developing application which is compatible for iOS 6 and iOS 7. I am using xcode 5 for that.I have created one view for it. For iOS 7 view is looked fine but in iOS 6 my view is under the status bar. I have googled for this problem but couldn't find any success. I am uploading screen shot for it. Any help is appreciated.

iOS 6 screen shot:

enter image description here

iOS 7 screen shot:

enter image description here

Kushal Shah
  • 1,303
  • 2
  • 17
  • 33

4 Answers4

1

This is how I solved this issue:

  1. instead of using a ViewController, use a TableViewController
  2. from the TableViewController delete the cell, and drop a simple view onto its tableView.
  3. expand the view to match the tableView's frame
  4. put all needed content in that view.

After this, the tableViewController will automatically adjust it's tableView right under the navigation bar as in IOS 7 as in 6.

John Smith
  • 2,012
  • 1
  • 21
  • 33
  • Why would some one want to use tableVC when they need VC?. – Vignesh Sep 27 '13 at 13:00
  • A tableviewController is a subclass of ViewController. my approach is the fastest solution if you dont wanna play with the frames, just remove the cell, and put a uivew. – John Smith Sep 27 '13 at 13:03
0

In iOS 7, i solve the problem creating a UIImageView inside status bar, and then inside add a UINavigationBar.


UIImageView (320x20px) x=0 y=0

UINavigationBar (320x44px) x=0 y=20


0

Although it's now deprecated, you could set wantsFullScreenLayout to YES for iOS 6.

Danyal Aytekin
  • 4,106
  • 3
  • 36
  • 44
-2

Make you navigation bar opaque. It will solve the problem.

Vignesh
  • 10,205
  • 2
  • 35
  • 73