答案 0 :(得分:1)
好吧,因为你不知道我会给一个简短的。您需要collectionView
和2个不同的collectionViewCells
。
UIImageView
)UIImageView
,在其上方是一个透明的UIView
,黑色,并且在两者之上,中间应该有一个UILabel
,显示照片的数量你没有表现出来。 UIViewController
应符合您需要处理此事件的UICollectionViewDelegate
func collectionView(_ collectionView: UICollectionView,
didSelectItemAt indexPath: IndexPath) {
// This is the last element where you show the second custom cell
if indexPath.item == collectionView.numberOfItems(inSection: indexPath.section) - 1 {
// Load all the items and pass it to the controller that you need to present
}
}
现在好好实施它,因为它可以帮助你更好地理解事情的工作方式iOS