Needed video to explain something better

I had trouble with this video.
https://www.raywenderlich.com/5662524-your-second-ios-and-swiftui-app/lessons/7

At 1:40 and 2:11 it shows using the fix button to fill in the text “TaskStore”. What it doesn’t say is that if I don’t retype the text, I will get a syntax error because what is there is a placeholder. The fix button game me the text “TaskStore” and I just tried putting “()” after it, but this completely failed.

@john2001plus Thanks very much for sharing.

This is how Xcode does autocomplete. It provides you with the method signature, which includes the types in the definition. One way to get the text to automatically fill with the actual string provided, is to simply press “Enter”, and the text will actually be typed in, and then yes, all you would do then is to enter the round brackets. This is how autocomplete works in Xcode and yes, it can be confusing at times, but because this is not something unique to SwiftUI, this point was specifically not addressed. :slight_smile:

I hope this helps!

All the best.

This topic was automatically closed after 166 days. New replies are no longer allowed.