Skip to content

Latest commit

 

History

History
17 lines (13 loc) · 493 Bytes

README.md

File metadata and controls

17 lines (13 loc) · 493 Bytes

AssetsCodeGenerator

Converting images folder to Images.xcassets and corresponding swift code. Image file names must end with scale, like ic_jike@2x.png.

Usage

  1. To generate Images.xcassets and code from given images folder, run:
swift GenerateAssetsAndCode.swift -i Images -assetsOutput Output/Images.xcassets -codeOutput Output
  1. Drag Images.xcassets and R.generated.swift to your project
  2. In your code:
let imageView = UIImageView(image: R.images.ic_jike)