Xcode iOS6中中断的UITableView上的浮动UIView

Xcode iOS6中中断的UITableView上的浮动UIView,xcode,uitableview,uiview,scrollview,ios6,Xcode,Uitableview,Uiview,Scrollview,Ios6,在我的应用程序中,我有一个浮动在UITableView顶部的UIView(可视化:连接到导航栏的底部),在iOS5下,我使用scrollViewDidScroll中的这些代码行使它浮动在顶部 // get the table and buttonView bounds CGRect tableBounds = self.tableView.bounds; CGRect buttonViewFrame = self.buttonView.frame; // make sure the but

在我的应用程序中,我有一个浮动在UITableView顶部的UIView(可视化:连接到导航栏的底部),在iOS5下,我使用scrollViewDidScroll中的这些代码行使它浮动在顶部

// get the table and buttonView bounds

CGRect tableBounds = self.tableView.bounds;

CGRect buttonViewFrame = self.buttonView.frame;

// make sure the buttonView at the table's original x and y as the content moves 

self.buttonView.frame = CGRectMake(tableBounds.origin.x,tableBounds.origin.y,buttonViewFrame.size.width,buttonViewFrame.size.height);
然而,这在iOS6中似乎不再起作用,有人知道为什么或者如何解决这个问题吗?我支持iOS5及以上版本

在浏览了iOS6发行说明后,我发现

请注意,通过在视图和滚动视图子树外的视图(如滚动视图的superview)之间创建约束,可以使滚动视图的子视图在其他滚动内容上浮动(而不是滚动)

我如何在代码中设置它,因为我在故事板中没有使用AutoLayout,因为我仍然支持iOS5。如果有人能告诉我为什么我在iOS5中使用的代码在ios6中不再有效,那也太好了