UPGRADE YOUR SKILLS: Learn advanced Swift and SwiftUI on Hacking with Swift+! >>

SOLVED: Day 23 – Milestone Challenge

Forums > 100 Days of Swift

Couple questions. First a quick one: On this page under the Hints bulleted list, on the last bullet did he mean didSelectItemAt or did he mean didSelectRowAt? I'm new to all of this but when I saw that I tried to look for didSelectItemAt and couldn't find it. didSelectRowAt seemed to meet my needs so that's what I went with so I am wondering if that's a mistake or not in the challenge.

Anyway, my real question: I have this working where the list of countries to populate the table view is a hard coded String array, but I wanted to get it working with the "preferred" way of reading in all the flags from the app bundle. However, since I didn't see any files for this challenge and we used the flags as Assets (or xcassets etc.) in the Project 2 challenge, I assumed I would use those files for this challenge and I assumed I would use them as Assets like we did in Project 2. His hint talks about using FileManager.default etc. like we did for the storm pictures in Project 1, but I think I need more to be able to see the things in the Assets.car right? I did a bit of googling and it seems that there's a definitely some extra work to be able to read these files and since there are both 2x and 3x files in there I'm not really sure how I'm supposed to do this. So I'm wondeirng if I misunderstood something in the challege and/or I need to get the flags from someplace else etc. What did others do here?

3      

Sorry for the late response, but I just got this far in the course.

Yes, I believe that was a typo and he meant to write didSelectRowAt

As for your second question, I did it by adding the files directly into the project navigator, rather than adding them as assets, similar to what we did in Project1. I only added the 2x files though, and just left the 3x ones out.

3      

I'm guessing the mistake with didSelectItemAt versus didSelectRowAt is because the Challenge for project 10 is to go back and re-do project 1 with a Collection View instead of a Table View. didSelectItemAt is appropriate to override for a Collection View.

3      

Hacking with Swift is sponsored by Essential Developer

SPONSORED Join a FREE crash course for mid/senior iOS devs who want to achieve an expert level of technical and practical skills – it’s the fast track to being a complete senior developer! Hurry up because it'll be available only until April 28th.

Click to save your free spot now

Sponsor Hacking with Swift and reach the world's largest Swift community!

Archived topic

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.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.