Status Bar issue

2019-02-11 03:10发布

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

2条回答
我想做一个坏孩纸
2楼-- · 2019-02-11 03:29

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!!

查看更多
SAY GOODBYE
3楼-- · 2019-02-11 03:51

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!!!!

查看更多
登录 后发表回答