兩個都蠻重要的
preselect collectionview https://stackoverflow.com/questions/45610785/how-to-preselect-and-highlight-a-cell-from-a-uicollectionview https://hackernoon.com/uicollectionviewcell-selection-made-easy-41dae148379d if collectionview allow multiple selection remeber add this, cell item could be Deselect collectionView. selectItem (at: indexPath, animated: true , scrollPosition: . top ) https://stackoverflow.com/questions/15330844/uicollectionview-select-and-deselect-issue save indexpath userdefault https://stackoverflow.com/questions/34804294/how-to-save-nsindexpath-locally https://stackoverflow.com/questions/37001643/how-to-add-nsindexpath-to-nsuserdefaults-in-swift navigation presneted viewcontroller dismiss https://stackoverflow.com/questions/31205002/why-is-it-bad-practice-to-have-a-viewcontroller-dismiss-itself indexpath comparison if selectIndexPath . contains (indexPath) { cell. isSelect...
留言
張貼留言