How to detect Cell selection in UITableView - Swift

前端 未结 3 987
失恋的感觉
失恋的感觉 2020-12-28 16:49

just wondering how I would go about implementing didSelectRowAtIndexPath or something similar into my app. I have a populated Table View with several dynamic cells and basi

3条回答
  •  春和景丽
    2020-12-28 17:17

    Use the following code to select cell at '0' index programmatically for collectionView.

    self.collectionView.reloadData()
    DispatchQueue.main.async {
      self.collectionView(self.collectionView, didSelectItemAt: IndexPath(item: 0, section: 0))
    }
    

提交回复
热议问题