iTableView表页脚iOS6的屏幕外视图?

iTableView表页脚iOS6的屏幕外视图?,ios,cocoa-touch,uitableview,Ios,Cocoa Touch,Uitableview,我有一个包含UITableView的视图。加载视图时,我将表的tableFooterView设置为手动创建的视图(包含按钮的UIView)。当视图出现时,我调整TableFooter视图的框架: CGRect tableFrame = self.myTableView.frame; CGRect originalFrame = self.tableFooter.frame; CGSize imageSize = CGSizeMake(40.0f, 40.0f); CGRect footerFra

我有一个包含UITableView的视图。加载视图时,我将表的tableFooterView设置为手动创建的视图(包含按钮的UIView)。当视图出现时,我调整TableFooter视图的框架:

CGRect tableFrame = self.myTableView.frame;
CGRect originalFrame = self.tableFooter.frame;
CGSize imageSize = CGSizeMake(40.0f, 40.0f);
CGRect footerFrame = CGRectMake(originalFrame.origin.x, originalFrame.origin.y, tableFrame.size.width, imageSize.height);
self.tableFooter.frame = footerFrame;
CGRect nextFrame = CGRectMake((footerFrame.size.width - imageSize.width) / 2.0f, 0.0f, imageSize.width, imageSize.height);
self.tableFooterButton.frame = nextFrame;
在iOS7上,这是我想要的方式——当我滚动到表的底部时,我会看到我的页脚视图。在iOS6上,当我滚动到表的底部时,页脚视图仍然在屏幕外(我可以拉动滚动视图并查看它,但当我释放时,它会重置为屏幕外)


我应该怎么做呢?

更改表尾的框架后,尝试以下操作:

self.myTableView.tableFooterView = nil ;
self.myTableView.tableFooterView = self.tableFooter ;

请在更改表尾的框架后重试<代码>self.myTableView.tableFooterView=nil;self.myTableView.tableFootView=self.tableFooter@KudoCC,可以正常工作。谢谢是否将其添加为答案?@AnkitAggarwal如果我们更改tableFooter的框架,tableView可能不会意识到这一点,因此其contentSize不会正确更改。代码所做的是重置tableView的tableFooterView,因此UITableView将相应地安排其内容。