ios - How to call index on UICollectionView using IBAction? -
i trying put bunch of options on uicollectionview using ibaction trigger open each option, have difficulty code should call trigger action using ibaction. here code:
@ibaction func opennewfilter(sender: anyobject) { self.collectionview.datasource = indexpath.section == 0 } func numberofsections() -> int { return 2 } func numberofitemsinsection(_ section: int) -> int { if section == 0 { return array.count } else if section == 1 { return 1 } else { return 0 } } func cellforitematindexpath(_ indexpath: nsindexpath) -> uicollectionviewcell? { if indexpath.section == 0 { } else if indexpath.section == 1 { } }
i appreciate if me, thanks..!!
Comments
Post a Comment