image-literals

Xcode 10 - image literals no longer available

巧了我就是萌 提交于 2019-11-28 07:54:15
Xcode 10 Release Notes: "Code Completion for Swift image literals has been removed in Xcode 10" So it's not a bug that I couldn't add images in the code (and run older projects). How do we then add images from now on in the code as just typing UIImageView(image: won't accept any png or jpeg. let cellImage: UIImageView = { let image = UIImageView(image: ???)) return image }() System: macOS Mojave Xcode: Xcode 10 Beta 4 Ron Gahlot 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

Xcode 10 - image literals no longer available

☆樱花仙子☆ 提交于 2019-11-27 05:41:24
问题 Xcode 10 Release Notes: "Code Completion for Swift image literals has been removed in Xcode 10" So it's not a bug that I couldn't add images in the code (and run older projects). How do we then add images from now on in the code as just typing UIImageView(image: won't accept any png or jpeg. let cellImage: UIImageView = { let image = UIImageView(image: ???)) return image }() System: macOS Mojave Xcode: Xcode 10 Beta 4 回答1: In Xcode 10 and Swift 4.2 , only the code completion function (or auto