正如你在下面我上传的第一张图片中看到的那样。我有3个段。在第一个段中,集合视图必须看起来像那样。但是,当我点击其他段时它必须消失。收藏视图必须在导航视图和内容之间另外,我上传了另一张图片,这是我的故事板。我在等你的帮助。谢谢!
你需要实施
func collectionView(_ collectionView: UICollectionView,
layout collectionViewLayout: UICollectionViewLayout,
sizeForItemAt indexPath: IndexPath) -> CGSize
return CGSize(width:<#width#>,height:<#height#>)
}