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      

TAKE YOUR SKILLS TO THE NEXT LEVEL If you like Hacking with Swift, you'll love Hacking with Swift+ – it's my premium service where you can learn advanced Swift and SwiftUI, functional programming, algorithms, and more. Plus it comes with stacks of benefits, including monthly live streams, downloadable projects, a 20% discount on all books, and free gifts!

Find out more

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.