简体   繁体   English

UICollectionView多个单元格选择Swift iOS

[英]UICollectionView Multiple Cells Selection Swift iOS

I have UICollectionView in my iOS app and I am using Swift. 我的iOS应用程序中有UICollectionView,并且正在使用Swift。 I want to make UI like below: 我想使UI如下所示: 1个

2

I this UI when "Select" button is not selected (in first image) Tab bar is visible, but when "Select" button is selected (in second image), a new bar is visible. 在此UI中,当未选择“选择”按钮时(在第一张图像中)选项卡栏可见,但是在选择“选择”按钮时(在第二张图像中),一个新栏可见。 This is used for multiple cells selection. 这用于多个单元格的选择。 I just want to know, Is this functionality available by Apple (built in) or I have to make it manually (by myself)? 我只想知道,此功能是否可以由Apple(内置)使用,还是必须手动(由我自己设置)? (I have searched, but could not find) (我已搜索,但找不到)

Collection View gives functionality to select multiple cells. 集合视图提供了选择多个单元格的功能。 Just write this code and you will be able to select multiple cells. 只需编写此代码,您就可以选择多个单元格。

 yourCollectionViewName.allowsMultipleSelection = true   

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM