假设你已经生成了R.generated.swift文件, 如果没生成请看R.swift使用 1. 在Assets.xcassets 文件中添加图片, 并按如下操作 image.png 2. 使用如下: image.png