You should be using UICollectionView. The image of each Cell should be set in the cellForItemAtIndexPath callback according to the Model data (such as imagePath) corresponding to the Cell. After you change the number through the Alert dialog box, you can modify the corresponding data of the Cell (imagePath and the like) in the response method of AlertAction, and then reloadData.
Another idea is that when you click on the Cell, you can get the indexPath of the Cell. Then after you change the number through the Alert dialog box, you can take this indexPath in the response method of AlertAction to call cellForItemAtIndexPath to get the Cell. Then just take this Cell object and modify its image.
After the setting is completed, just use the reload method. This function can be implemented by customizing the Delegate through the proxy or using a block. Of course, notifications are also available. It just tells the view that the event needs to be reloaded
You should be using UICollectionView. The image of each Cell should be set in the cellForItemAtIndexPath callback according to the Model data (such as imagePath) corresponding to the Cell. After you change the number through the Alert dialog box, you can modify the corresponding data of the Cell (imagePath and the like) in the response method of AlertAction, and then reloadData.
Another idea is that when you click on the Cell, you can get the indexPath of the Cell. Then after you change the number through the Alert dialog box, you can take this indexPath in the response method of AlertAction to call cellForItemAtIndexPath to get the Cell. Then just take this Cell object and modify its image.
The callback method setImage is determined at the alert point
Write a protocol in the cell to call back the view controller
Set in AlertAction BLOCK
ReloadData() directly after setting the data, this is the simplest
After the setting is completed, just use the reload method. This function can be implemented by customizing the Delegate through the proxy or using a block. Of course, notifications are also available. It just tells the view that the event needs to be reloaded