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

Project 3 challenge questions

Forums > 100 Days of Swift

For the first challenge which asks for this:

"Try adding the image name to the list of items that are shared"

here's my attempted solution.

What am I doing wrong as I can't see anything relating to the image name pop on the share button when I click it?

3      

Nowhere in your code do you actually get the image's name. On line 50, you get a Bool that indicates whether or not the image name starts with "nssl" but that's not the same thing as the name itself.

The image's name is held within the selectedImage property.

3      

Oh, and also:

When posting code to these forums, please post the code as text rather than an image. This makes it far easier to read (some of us have aging eyes!) and also makes it possible for other posters to copy/paste the code in order to test solutions and such without having to retype all your code from scratch.

To post your code as text, place three backticks ``` on the line before your code and three backticks ``` on the line after your code so that it will be formatted properly. You can also highlight an entire code block and click the </> button on the toolbar to wrap the block for you, athough it's usually better to put the backticks before you paste in your code.

4      

Thanks @roosterboy for your help and I'll be formatting codes properly in the future.

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.