添加一个button 等宽与视图的宽度
tryButton = [UIButtonbuttonWithType:UIButtonTypeCustom];
tryButton.frame =CGRectMake(0,self.view.frame.size.height-44,self.view.frame.size.width,44);
// [tryButton setBackgroundImage:[UIImage imageNamed:@""] forState:UIControlStateNormal];
[tryButtonsetBackgroundColor:[UIColorredColor]];
[tryButtonaddTarget:selfaction:@selector(tryButtonAction)forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:tryButton];
添加在scrollView方法里设置坐标即可
-(void)scrollViewDidScroll:(UIScrollView *)scrollView
{
tryButton.frame =CGRectMake(0, (self.tableView.frame.size.height - 150) + self.tableView.contentOffset.y , tryButton.frame.size.width,tryButton.frame.size.height);
}