-(void) Scrollviewdidscroll: (Uiscrollview *) scrollview{UITableView *tableview = (UITableView *) ScrollView; CGFloat sectionheaderheight = autowhgetheight (50); CGFloat sectionfooterheight = autowhgetheight (0); CGFloat OffsetY = Tableview.contentoffset.y; if (OffsetY >= 0 && offsetY <= sectionheaderheight) {tableview.contentinset = Uiedgeinsetsmake (-o Ffsety, 0,-sectionfooterheight, 0); } else if (OffsetY >= sectionheaderheight && OffsetY <= tableview.contentsize.height-tableview.frame.size . height-sectionfooterheight) {Tableview.contentinset = Uiedgeinsetsmake (-sectionheaderheight, 0,-sectionFoot Erheight, 0); } else if (OffsetY >= tableview.contentsize.height-tableview.frame.size.height-sectionfooterheight && Offs Ety <= tableview.contentsize.height-tableview.frame.size.height) {tableview.contentinset = UIEdgeInsetsMak E (-offsety, 0,-(tableview.contentsize.height-tableview.frame.sizE.height-sectionfooterheight), 0); }}
IOS TableView don't let head and tail follow