Group Group Group Group Group Group Group Group Group

MyLocations Chapter 31 - Self has no member View?

#1

I’m on the last chapter of MyLocations, on the part where a roll-away logo animation is being added. But the code for creating the logoButton is returning an error at the line where the x coordinate for the centre of the button is assigned, as in the picture below.


It’s saying that Value of type '(CurrentLocationViewController) -> () -> (CurrentLocationViewController)' has no member 'view'
How do I solve this? Is there an error with my code?
Do note that this is code from the iOS 11, Xcode 9 and Swift 4 version of the book, although I am using the latest version of all of these.

Thanks!

#2

Hi @coder_rgv7, looks like you are missing “lazy” before var logoButton.

Best,
Gina