私は次のようにして、Swift 1.2のTableViewControllerでこれを達成しました(迅速な解決策を探しているときに私がしたように人々がこれに出くわした場合)。
ストーリーボードに TableViewController を配置したら、ビューをコントローラーにドラッグします。必要に応じて設定し、右クリック (または Ctrl キーを押しながらクリック) してソースにドラッグし、IBOutlet を作成します。次に、ビューをクリックしてトップ バーにドラッグします
。TableViewController のソースに変更すると、UIScrollViewDelegate を派生させる必要があります。設定する必要がありtableView.delegate = self
ます。その後、次のことができます
self.tableView.contentInset = UIEdgeInsetsMake(0.0, 0.0, floatingView.frame.height, 0.0)
self.tableView.scrollIndicatorInsets = UIEdgeInsetsMake(0.0, 0.0, floatingView.frame.height, 0.0)
floatingView.frame.origin.y = self.tableView.bounds.origin.y + self.tableView.frame.height - floatingView.frame.height
floatingView.autoresizingMask = UIViewAutoresizing.FlexibleTopMargin
self.view.addSubview(floatingView)
その後
override func scrollViewDidScroll(scrollView: UIScrollView) {
floatingView.frame = CGRectMake(self.floatingView.frame.origin.x, self.tableView.bounds.origin.y + self.tableView.frame.height - floatingView.frame.height, self.floatingView.frame.size.width, self.floatingView.frame.size.height)
}