xCode 不允许用特殊字母命名图片

xCode doesn't allow to name an image with special letters

我想给 Assets.xcassets 中的图像命名,例如 "a"、“á”、“â”、“ã”、“à”,但是当我尝试用“á”命名图像时" 并点击 'enter',名字变成 "a-1","â" - 变成 "a-2" 等等。如何使用此符号设置图像名称?

已解决

在评论中检查正确答案

我可以在 Xcode 8.3 中添加具有此名称的图像 Please check this image

尝试在添加到 Assets.xcassets 之前重命名您的图像文件,这样您就可以添加文件了。其余相同,将您的图像文件命名为

Swift 3Swift 4

let image = UIImage(named: "á")

Objective-C

UIImage *image = [UIImage imageNamed:@"á"];

正如我在苹果论坛上得到的回答

For XCode, if you name images a and à, it considers that it's the same name ; would be the same with a and A.

所以我被迫将我的图片命名为

  1. a -> a1
  2. á -> a2
  3. â -> a3
  4. 等等

Check it out here