Illumination 1.0

Illumination 1.0

Maintained by Igor Matyushkin.




Illumination

At a Glance

Illumination is a simple but powerful tool for highlighting content in iOS app.

How To Get Started

  • Copy content of Source folder to your project.

or

  • Use Illumination cocoapod

Requirements

  • iOS 9 and later
  • Xcode 9 and later
  • Swift 4

Usage

Illumination class is the main thing in the library. It's quite simple to change level of illumination in the entire app:

Illumination.shared.level = .dark

// or

Illumination.shared.level = .light

When the level is changed, all views and view controllers in the app receives a notification that can be handled by overriding special method:

class MyViewController: UIViewController {

    override func illuminationLevelDidChange(to level: IlluminationLevel) {
        super.illuminationLevelDidChange(to: level)
        
        switch level {
        case .dark:
            // Setup content for dark tint colors
            break
        case .light:
            // Setup content for light tint colors
            break
        }
    }

}

The same method can be overriden in custom UIView subclasses.

License

Illumination is available under the MIT license. See the LICENSE file for more info.