已结束。此问题是
not reproducible or was caused by typos .它目前不接受答案。
Best Answer-推荐答案 strong>
func collectionView(_collectionView: UICollectionView, didSelectItemAtIndexPath indexPath: IndexPath) {
let cell = collectionView.cellForItemAtIndexPath(indexPath) as! DateCell
cell.layer.borderWidth = 2.0
cell.layer.borderColor = UIColor.gray.cgColor
}
func collectionView(_collectionView: UICollectionView, didDeselectItemAtIndexPath indexPath: IndexPath) {
let cell = collectionView.cellForItemAtIndexPath(indexPath) as! DateCell
cell.layer.borderWidth = 2.0
cell.layer.borderColor = UIColor.gray.cgColor
}
Try This One
关于ios - Collection View 单元格边框颜色在 Swift 3 中取消选择,我们在Stack Overflow上找到一个类似的问题:
https://stackoverflow.com/questions/45880165/
欢迎光临 OGeek|极客世界-中国程序员成长平台 (https://ogeek.cn/) |
Powered by Discuz! X3.4 |