if (iOS7) {
       self.edgesForExtendedLayout = UIRectEdgeNone;
        self.extendedLayoutIncludesOpaqueBars = NO;
        self.automaticallyAdjustsScrollViewInsets = YES;
        self.modalPresentationCapturesStatusBarAppearance = NO;
    }
self.navigationController.navigationBar.translucent = NO;  设置了代码也不可以,好虐心,求助,能详解的更好。类似图片显示的这样:

解决方案 »

  1.   

    把 Use Autolayout关掉。 然后用代码下拉20个像素试试。
      

  2.   

    这是因为ios7UIViewController是全屏的原因吧,把每个subview都往下移动20像素
      

  3.   

    提供一套比较好的宏,创建rect时,使用以下宏,可以避免上面的情况。
    #define IsIOS7 ([[[[UIDevice currentDevice] systemVersion] substringToIndex:1] intValue]>=7)
    #define CGRECT_NO_NAV(x,y,w,h) CGRectMake((x), (y+(IsIOS7?20:0)), (w), (h))
    #define CGRECT_HAVE_NAV(x,y,w,h) CGRectMake((x), (y+(IsIOS7?64:0)), (w), (h))