Status bar and navigation bar issue in IOS7

Fix for status bar issue in IOS 7

Finally I fixed the status bar over lap issue using the delta value property in xcode5. First I have increased origin – y 20pxl to all the controller used in the Xib (it seams to be working fine only in IOS 7), after that I set the delta value for all the view controller origin -y to -20 it works fine in both iOS 6 and iOS 7.

Steps to do that.

Xcode 5 provide preview option to view the appearance of the xib in different view based on the OS version.

Choose preview option from assistant editor

Click assistant editor

enter image description here

and choose preview option to preview selected view controller in different version.

enter image description here

view controller view preview option.

enter image description here

in preview you can find the toggle option to preview view in different version. In preview u can feel the status bar issue clearly if its not fixed properly by toggle the version.

Three steps to fix the status bar issue:
step 1: Make sure the view target us 7.0 and later in File inspector.

enter image description here

Step 2 : Increase the origin – y with 20 pixel (exactly the size of the status bar) for all the controls added in the view controller.

Step 3 : Set the delta value of origin y to -20 for all the controls then only it will adjust automatically based on the version. Use preview now and feel the differ that the controls automatically adjust because of the delta value.

enter image description here

Once the status bar issue fixed, issue while presenting the model view (ZbarSDk controller) is also fixed automatically.

Preview screen :

enter image description here

Leave a Comment