_collectionView.contentInset = UIEdgeInsetsMake(-20, 0, 0, 0); // 向上偏移20;和scrollview一样,设置IcontentInset的偏移量就行了