2

As you can see from my image, the status bar is displaying on top of my table view and i don't understand what i have done wrong for this to happen. i am sure that it will be a simple fix and i'm just missing it.

Any help will be much appreciated, Thanks!

In App View

Fernando
  • 241
  • 3
  • 10

2 Answers2

1

you can avoid this problem by writing below code in ViewDidLoad method...

  float SystemVersion=[[[UIDevice currentDevice] systemVersion] floatValue];

if(SystemVersion<7.0f)
{
//Currently your app is running in IOS6 or older version. So you need not to do anything.  
}
else
{
// Currently your app is running in IOS7. Do the following.

CGRect TempRect;
for(UIView *sub in [[self view] subviews])
{
    TempRect=[sub frame];
    TempRect.origin.y+=20.0f; //Height of status bar
    [sub setFrame:TempRect];
}
}

let me know it is working or not my friend!!!

Happy Coding!!!!

NiravPatel
  • 3,260
  • 2
  • 21
  • 31
  • Hey, that worked for my Status bar problem! i forgot to write something saying my navigation bar is displaying at the bottom in the second image. do you have a fix for that? – Fernando Oct 03 '13 at 11:53
  • i'll just post another question for the navigation bar and accept your answer for the status bar. Thanks! – Fernando Oct 03 '13 at 11:57
  • thanks a lot man....!!! i am searching the answer for your navigation bar problem.... – NiravPatel Oct 03 '13 at 11:57
  • accepted the answer and changed my question, if there is a way to chat on this i'll do that instead of all these comments – Fernando Oct 03 '13 at 11:59
  • yeh, i just dragged and dropped on the storyboard, i'm not using a controller – Fernando Oct 03 '13 at 12:00
  • so, what you will have to do is make that custom bar's to connect on only upside....i am posting an image.Check that... – NiravPatel Oct 03 '13 at 12:03
  • let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/38547/discussion-between-fernando-and-niravpatel) – Fernando Oct 03 '13 at 12:16
0

enter image description here

like this.. In Autosizing of Custom bar...Only connect to upper side....

Let me know it is working or not!!!

Happy Coding!!

NiravPatel
  • 3,260
  • 2
  • 21
  • 31
  • can you answer on this question, as i asked a new one so there wasnt to questions in one. http://stackoverflow.com/questions/19158759/navigation-bar-is-displaying-at-the-bottom – Fernando Oct 03 '13 at 12:07
  • i answered you on that question, but please show me your view property on custom bar as i have posted(like this image). – NiravPatel Oct 03 '13 at 12:08
  • hi Fernando, show me image of your navigation bar's View..like which i have posted on this answer.so me that image of navigation bar's view. – NiravPatel Oct 03 '13 at 12:11