|
G’day guys. I’m currently at day 44 of 👉🏻 I’m not sure if Paul would show it in future projects of the course, but I’d appreciate it if anyone could help me with it? So far I only know that the Delete action is supposed to do 2 things
I’ve attached my
|
|
So here's what I gathered, with the help from Prathamesh Kowarkar on the course's Slack channel
The 1st one is done by:
Here's the particular code for the
I'm still not sure about how to delete the edited image from the disk. If I recall correctly, Paul said it's gonna be mentioned in Project 12, so I'm looking forward to learning about that. |
|
Why you want to delete the image? We need to show the second alert to replace the current person name from the image or to delete it. This is what I'm trying to work out at the moment as well, self?.people.remove(at: indexPath.item) will automatically delete the image from the cell I tried this one as well. We want to show the second alert when we tap second time on the picture, because first time when we tap on it first alert will come up to add a person name, second time we want to rename or delete the person name. This would make more sense a bit but yeah we can delete the image as well but that would be a different condition there. |
|
Challange says that we need to use a second alert, we need to track the tapped status somehow, from what I see you are using an actionsheet. Because first time when we tap the imagine the first alert will pop, and when we tap second time a different alert should be displayed, this has more logic. |
SPONSORED Take the pain out of configuring and testing your paywalls. RevenueCat's Paywalls allow you to remotely configure your entire paywall view without any code changes or app updates.
Sponsor Hacking with Swift and reach the world's largest Swift community!
This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.
All interactions here are governed by our code of conduct.
Link copied to your pasteboard.