Swift Package Index


A lightweight commandline tool to automatically generate strong-typed image references.


  • The latest stable release is 1.4.2. Released 4 months ago.
  • The last commit to main was 4 months ago.

Swift Version Compatibility

  • 1.4.2 and main
    5.3
    5.2
    5.1
    5.0
    4.2
Full build results

Platform Compatibility

  • 1.4.2 and main
    iOS
    macOS(Intel)
    macOS(ARM)
    Linux
    tvOS
    watchOS
Full build results

Radon

Radon is part of the E-sites iOS Suite.


A lightweight framework to schedule and cancel local notifications.

forthebadge forthebadge

Platform CocoaPods Compatible Quality Travis-ci

Inspired by R.swift by Mathijs Kadijk. 👏
The difference between R.swift and this one, is that it only looks for images and has a special --watch parameter.

Installation

Cocoapods

Podfile:

pod 'Radon'

And then

pod install

Manual

Just download the radon binary and put it anywhere you like.

Generating

Just run:

$ Pods/Radon/bin/radon

With the following options:

Usage: Pods/Radon/bin/radon [options]
  -f, --folder:
      The folder to scan
  -o, --output:
      The folder to write the Radon.swift files to
  -w, --watch:
      Automatically watch the 'folder'
  -r, --remove_foldernames:
      Remove the name of the folder from the filename

With the --watch option the cli app wil automatically scan the folder and generate the Radon files when any changes have been made inside that folder.

So for instance:

$ Pods/Radon/bin/radon --folder ./Resources/ --output ./Classes/Generated/ --watch --remove_foldernames

This will generate two files:

  • Radon.swift
  • Radon+images.swift

You can use these two files in your project.

See the example project for more information.

Usage

let image = Radon.images.assets.icons.ironMan
    
let imageView = UIImageView(image: image)
imageView.frame = CGRect(x: 50, y: 50, width: 100, height: 100)
self.view.addSubview(imageView)

For your convenience you can also use the shorthand R.swift notation.

typealias R = Radon