Error when building Chris’ tutorial “Swift UI Navigation & Lists”

Hi there,

I am a total newbie to app development with swift, so maybe this is quickly answered.

What you’re trying to do / What isn’t working as expected / What’s the error message (if it’s a crash)

I am running Xcode 11.2.1 on macOS Catalina 10.15.1. Everything seems to work fine as I followed Chris’ tutorial “Swift UI Navigation & Lists” until I cannot build and run the code due to the following error for my LandmarkList.swift file (see github file below): "Int’ is not convertible to ‘CGFloat?’

What you’ve already tried to fix the issue

I’ve searched on Stack Overflow and saw 1 article saying that I need to add “.0” to the integer “300” and that should fix the issue, but it did not.

Thanks for any help you can provide! I love Chris’ tutorials and really hope I can complete this tutorials and progress in my learning.

Yi-Bing

can you post a screenshot of the code so we can see the error

just uploaded a screenshot. thanks!

did you try doing CGFloat(300)