Top "Indexpath" questions

How to get indexpath from row index Swift

I am loading an array to UIcollectionview(later will add other data) . I want to select collection view item randomly …

ios swift collectionview indexpath
Swift 3 Array, remove more than one item at once, with .remove(at: i)

Is it possible to remove more than one item from an array, at the same time, using index locations as …

ios arrays swift xcode indexpath
How to check if IndexPath is valid?

Prior to swift 3, i used to use for example: let path = self.tableView.indexPathForSelectedRow if (path != NSNotFound) { //do something } But …

ios swift swift3 nsindexpath indexpath
ERROR: Attempt to insert item 0 into section 0, but there are only 0 items in section 0 after the update

My code: DataService.dataService.fetchDataFromServer { (channel) in self.channels.append(channel) let indexPath = IndexPath(item: self.channels.count - 1, section: 0) …

ios swift uicollectionviewcell indexpath