import - Why does Xcode auto-completion not work and keep showing errors? -


I'm new to Xcode "days" after a few days of "normal" use, where I did not find any problems at all, So Xcode stopped working properly.

After the code is complete, only the methods ("M") come to me. If, for example, I am in "ViewController.swift" and writes ... , an error appears and I do not see the signal It seems that it does not "import" the correct libraries Does.

img3

Restart Xcode. Deleting the derived data Xcode folder should fix the problem. You can do this by removing all the subfolders in the ~ / Library / Developer / XCode / DerivedData and.

By the way, in the first screenshot, you can not use a if statement in that manner (outside any work). So this may not be Xcode's problem.

I'm looking at your second screenshot: You can not type init . It does not understand.

In the third screenshot, you are trying to do something import , but you have to import the module outside of any class.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -