|
Update: I fixed this : ) Hello my friends, I am so close to figuring out the Milestone challange but running into 2 bugs that i just can't figure out :
PS: The class i created is called " EachCell ", which contains var Caption, and var Photo. My ViewController:
My DetailViewController:
Grateful for your help! Thank you all ! |
|
You cannot create the alert in the |
|
What about |
|
Hmm oopsss I think I accidentally deleted my previous reply??! You are right that totally worked !!! Now i just have to figure out why my detailVC isn't showing the photo. its loading the title fine, which is the same as caption, but no pictures. So strange. i thought it messed up the IBOutlet or something in the storyBoard , but re-did it 3 times and now im convinced my code is fked* . Thank for your help : ) |
|
|
|
@Kru178 - For me, I think the issue was in my didSelectRowAt. I end up finding the path for where each photo were saved in the local user directory, and then used that to set my vc.selectedImage.
Here is the github code, I hope it helps? I'm obvisouly not an expert haha but this worked for me. |
|
@fsafddg Ahh sorry friend, I am not familiar with Wordpress, so I couln't answer that question :( |
|
For anybody else looking for the answer why detail VC doesn't show the image after app relaunch, this article helped me: https://handyopinion.com/save-load-image-from-documents-directory-in-swift/ |
BUILD THE ULTIMATE PORTFOLIO APP Most Swift tutorials help you solve one specific problem, but in my Ultimate Portfolio App series I show you how to get all the best practices into a single app: architecture, testing, performance, accessibility, localization, project organization, and so much more, all while building a SwiftUI app that works on iOS, macOS and watchOS.
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.