|
|
|
Hey there friend! I had the same problem, read through this thread, it might help you: https://www.hackingwithswift.com/forums/100-days-of-swift/project-1-challenge-task-3/624 I you need any further assistance, I'll do my best to help! |
|
|
|
When i create selectedPictureNumber in DetailViewController, i can't find it in ViewController |
|
That's the point! You have to refer to it yourself. Take a look at
You can read 'vc' up here as the Detail View Controller. So what the line above means, is: "The property 'selectedImage' from the Detail View Controller is made by adding +1 to the |
|
|
|
@MateusZ One thing that I don't get is this bit of code
It doesn't reference to anything, right? How does it know what kind of indexPath.row + 1 it needs to ''get"? I ask this because this is the way i wrote that other variable that we needed in the challange.
As you can see it references to 'picutures' where does this code reference to?
Little confused here. |
|
Hello, According to Paul's instructions, in Also, in
While So, if we tap on the FIRST picture the table view, the title of the picture will be: Picture 1 of 10 If we didn't add + 1 to Picture 0 of 10 Hope that helps! |
SPONSORED Alex is the iOS & Mac developer’s ultimate AI assistant. It integrates with Xcode, offering a best-in-class Swift coding agent. Generate modern SwiftUI from images. Fast-apply suggestions from Claude 3.5 Sonnet, o3-mini, and DeepSeek R1. Autofix Swift 6 errors and warnings. And so much more. Start your 7-day free trial today!
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.