ios 7 UiView frame issue

前端 未结 6 1668
渐次进展
渐次进展 2021-01-31 03:26

I am running same app in iOS6 and iOS7 which has NavigationBar.It runs well on iOS6, but in iOS7, all view is little bit up like it is not considering the Navigation bar at all.

6条回答
  •  轮回少年
    2021-01-31 04:00

    In iOS 7, view controllers use full-screen layout. it is mentioned in iOS 7 UI Transition Guide

    if you want change the layout use edgesForExtendedLayout property

    example:

       if([UIViewController instancesRespondToSelector:@selector(edgesForExtendedLayout)])
    
            self.edgesForExtendedLayout=UIRectEdgeNone;
    

提交回复
热议问题