O
Size: a a a
GZ
АA
Е
A
BageCellDelegate: class {
func didSelect(cell:
UICollectionViewCell)
func didDeSelect(cell:
UICollectionViewCell)
}
cellForItemAt indexPath:
allCells
didDeSelect(cell:
UICollectionViewCell) {
guard
let index = allCells.firstIndex(of: cell)
else {
return }
let changedCell = allCells[index]
changedCell.stateOfCell = .deselect
let encodeData: Data = NSKeyedArchiver.archivedData(withRootObject: allBagesCells)
UserDefaults.standard.set(encodeData, forKey: "
cells")
UserDefaults.standard.synchronize()
}
allCells
DZ
✖
override func willMove(toParentViewController parent: UIViewController?) {
задаешь цвет нав бара в первом vc
}
G
G
G
S
override func willMove(toParentViewController parent: UIViewController?) {
задаешь цвет нав бара в первом vc
}
G
BageCellDelegate: class {
func didSelect(cell:
UICollectionViewCell)
func didDeSelect(cell:
UICollectionViewCell)
}
cellForItemAt indexPath:
allCells
didDeSelect(cell:
UICollectionViewCell) {
guard
let index = allCells.firstIndex(of: cell)
else {
return }
let changedCell = allCells[index]
changedCell.stateOfCell = .deselect
let encodeData: Data = NSKeyedArchiver.archivedData(withRootObject: allBagesCells)
UserDefaults.standard.set(encodeData, forKey: "
cells")
UserDefaults.standard.synchronize()
}
allCells