Xcode 10 - image literals no longer available Xcode 10 - image literals no longer available xcode xcode

Xcode 10 - image literals no longer available


In Xcode 10 and Swift 4.2, only the code completion function (or auto-complete) of the Xcode IDE has been discontinued for the old way. Here is the new way:

Just type image literal and it will complete with default icon.

enter image description here

 

Double click on this icon and it will open the media library right side of it.

enter image description here

 

Just choose your imagem and it work like before!

enter image description here


Found the Shortcut to open the Media Library Tab:

++M

At this point the official documentation does not cover some use cases at Xcode 10 beta so I'm not able to find a way to move the media part to the old position.


You can use Media Library in Xcode to add image literal to your code:

Show XCode media library

And then choose image from library and drag&drop it to your code

Choose image from library

It will create image literal