UICollectionViewFlowLayout の sectionHeadersPinToVisibleBounds を true にする。 同じく FlowLayout の headerReferenceSize のサイズを設定する。 ストーリーボードを使わない場合、デフォルトは (0,0) なので必ず設定する。 下記はストーリーボードを使用した場合の処理 override func viewDidLoad() { super.viewDidLoad() // あらかじめストーリーボードで CollectionView の View セクションの Tag に 1 を設定しておく let cv = self.view.viewWithTag(1) as! UICollectionView // FlowLayout を取得して sectionHeadersPinToVisibleBo