XCode 8 doesn't show images in storyboard

前端 未结 5 1622
伪装坚强ぢ
伪装坚强ぢ 2020-12-19 08:34

After updating xcode all images in the storyboard appeared as question marks (as it doesn\'t find them). I tried to remove/add them, cleared derived data but still all image

5条回答
  •  -上瘾入骨i
    2020-12-19 09:33

    You have to use xcassets catalog for your images:

    1) Access Assets.xcassets

    2) Create new Image Set or choose from the list and update existing one

    3) Place your image variants in its @1x, @2x and @3x sizes:

    Call your image in your code like:

    let image = UIImage(named: "NewImageName")
    

提交回复
热议问题