float ver =[[[UIDevice currentDevice] systemVersion] floatValue]; if(ver>=7.0) { self.edgesForExtendedLayout =UIRectEdgeNone; self.automaticallyAdjustsScrollViewInsets = NO; }