ios - didSelectItemAt indexPath called after a long press -
i have used collectionview , set imageview in collection view cell. need move viewcontroller after cell touched. problem view moves after long press on cell in collection view. code.
func collectionview(_ collectionview: uicollectionview, didselectitemat indexpath: indexpath) { let imagespath = documentpath.appendingpathcomponent(reportimagefolder) let cell = arrimagesfiltered[indexpath.item] let imagenamewithpath = "\(imagespath)/\(cell)" let imageeditviewcontroller = self.storyboard?.instantiateviewcontroller(withidentifier: "editimageviewcontroller") as! editimageviewcontroller imageeditviewcontroller.imagepath = imagenamewithpath self.navigationcontroller?.pushviewcontroller(imageeditviewcontroller, animated: true) }
Comments
Post a Comment