简体   繁体   中英

IOS7 tableview bottom extra space in the viewcontrol

I made a view that is embed by a navigationbar view . And the issue is the tableview cannot overlap the extra space at the bottom of view . Please review the picture. 在此输入图像描述

I made the view background color to be green, so you can see the extra space on the bottom clearly.

No matter I set the uitableview height to be more than "568" , nor set the extend edges disselect the "under the top bars", the extra space is always existed.

Could you give me some advises? I used Xcode 5 and IOS SDK 7.0 .

Thanks a lot.

It seems like your navigation bar is translucent. In IOS 7, the translucent property becomes YES in default. Thats why your tableview appears in the top. In order to solve this you have to set the navigation bar's translucent as NO after creating your navigation controller object just like:

UINavigationController *navCtrl1 = [[UINavigationController alloc]initWithRootViewController:home];
navCtrl1.navigationBar.translucent = NO;

也试过这个

float systemVersion=[[[UIDevice currentDevice] systemVersion] floatValue];
    if(systemVersion>=7.0f)
    {
        self.edgesForExtendedLayout=UIRectEdgeNone;

    }

tried this in your viewDidLaod() .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM