When I am trying to print using println()
function it is not showing autocomplete parameter list in swift. Is there any problem in my Xcode?
Delete user/Library/Developer/Xcode/DerivedData
and delete the data of folder(Derive data) and restart Xcode. Should work. If doesn't, restart mac after doing this.
Note: for Xcode 11.7 and maybe later, use the
~/Library/Developer/Xcode/DerivedData/
path.
Hi I found the reason for this.... As Dhruv mentioned, it only accepts string argument. So we need to convert object to string inline println() function.
For example:
we have integer defined as var age:Int = 24
then we can print this as
println("\(age)")
In this case we will get autocomplete option. On other hand println(age) will print same result as above.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With