Is there a way to turn off Xcode 8's autocomplete for image names?

Xcode 8 has this new feature that is supposed to suggest image file names when you use UIImage(named:)

In my case it suggests image names even when it doesn't make any sense.


There is nothing in preferences. I wonder if there is some secret command to disable this part of autocompletion.


No this unfortunately can't be turned off, and nothing states that this is fixed in the Xcode 8.1 Release Notes.

It should either be fixed or you should have the opportunity to turn it off. The functionality is kind of good when it´s used for it´s purpose only, as I describe in this post.

But the issue is that Xcode 8 is inserting images inline in source when it can't possibly make any sense as you mention. For example, if you have a for iteration and type for x in to start a loop and you have any image in the project whose name matches "in" using this syntax.

Annoying issue, that I hope Apple will fix soon, because the feature is good when it´s used for images only.

Update: Just confirmed that this is still an issue in Xcode 8.1 stable version.

Update: This functionality remains in Xcode Version 9.0 beta 6 (9M214v)


This seems to be fixed in Xcode 10 now.

It seems to me that the best way to deal with this issue is by using comments (commmand + /). Changing the code to become a comment seems to turn off the autocomplete for image names.

So, you would have basically to switch back and forth between commenting and uncommenting your code (e.g. you find an error, make your code as a comment, fix the error, uncomment your code, check if your changes fixed the issue, and so on.).

Example of the same code with and without being a comment.

Simply update to Xcode 10: the image autocompletion feature has been discontinued:

Code Completion for Swift image literals has been removed in Xcode 10. (38087260)

Source: the Xcode 10 Beta release notes (this note was removed in the final release notes)

Need Your Help

How do I use PHP to get the current year?

php date

I want to put a copyright notice in the footer of a web site, but I think it's incredibly tacky for the year to be out-of-date. How would I make the year update automatically with PHP 4 and PH...

int.Parse of "8" fails. int.Parse always requires CultureInfo.InvariantCulture?

c# .net parsing cultureinfo currentculture

We develop an established software which works fine on all known computers except one. The problem is to parse strings that begin with "8". It seems like "8" in the beginning of a string is a reser...