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

Project 1, problem with getting the array of images.

Forums > 100 Days of Swift

For some reason (maybe because of newer XCode), my array of pictures is empty. While trying to debug I printed content of constant - items, and I get this printed: ["_CodeSignature", "Project1", "Content", "Base.lproj", "Assets.car", "Info.plist", "PkgInfo"]
So no image names there.

Everything was done as in tutorial.

P.S. Also I noticed SceneDelegate file in my project, which is not seen in tutorial.

Please advise

screenshot

3      

It's sound when you set up the project you selected the "User Interface" of SwiftUI and not Storyboard as SwiftUI used to create a SceneDelegate file (this does not in Xcode12), however if doing 100 days of Swift you need to make sure that you select Storyboard as most of code will not work.

Hope this is clear. Good luck with the course

3      

Storyboard projects also create a SceneDelegate file.

@Alexdive, are you sure you put the images in the proper location? Here's what I get when I print the items array:

["_CodeSignature", "Project1", "nssl0049.jpg", "Base.lproj", 
"nssl0046.jpg", "nssl0091.jpg", "nssl0045.jpg", "nssl0051.jpg", 
"nssl0041.jpg", "nssl0042.jpg", "nssl0043.jpg", "nssl0033.jpg", 
"Info.plist", "PkgInfo", "nssl0034.jpg"]

You can see that there is no Content folder as in yours.

Does your project navigator look like this?

project1_navigator

3      

@jimiase4 - This is a web site about Swift not Android that why it called Hacking with Swift and not Hacking with Android. Think you are spaming people.

3      

Hacking with Swift is sponsored by RevenueCat

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.

Learn more here

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.