iOS Functions in Swift Adding Power to Functions Default Values

James Clopton
James Clopton
2,060 Points

my autocomplete does not work like yours I am using swift 5 would that make a difference

when using the function area I have to type the length: and then the actual length as with the width. My autocomplete does not show up as your does. Is this because I am using Swift 5

1 Answer

Michael Hulet
MOD
Michael Hulet
Treehouse Moderator 46,961 Points

Autocomplete should still work with Swift 5, so that shouldn't make a difference. Is there a compiler error somewhere in your code that might prevent Playgrounds from running? If not, it sounds like Xcode might've gotten a little bit corrupted, which happens sometimes. It might help if you hit Command+Shift+K to clean your build folder and restart Xcode