Status Bar issue

前端 未结 2 712
迷失自我
迷失自我 2021-01-03 13:15

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

相关标签:
2条回答
  • 2021-01-03 13:28

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

    0 讨论(0)
  • 2021-01-03 13:41

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

    0 讨论(0)
提交回复
热议问题