         self.screenBrightnessDidChange()
     }
     
-    /***/
+    /**
+     Called when a `brightness` of device screen changes.
+     */
     public func screenBrightnessDidChange() {
         self.delegate?.screenBrightnessDidChange()
     }

    weak var screen: UIScreen!
    var notificationCenter: NSNotificationCenter
    
    /***/
    convenience public init(screen: UIScreen) {
        self.init(screen: screen, notificationCenter: NSNotificationCenter.defaultCenter())
    }
    
    /***/
    public init(screen: UIScreen, notificationCenter: NSNotificationCenter) {
        self.screen = screen
        self.notificationCenter = notificationCenter


import Foundation

/**
 `ScreenBrightness` delegate.
 
 A class with ability to receive changes in screen brightness.
 */
public protocol ScreenBrightnessMonitoring: class {
    
    /**
     Called when a `brightness` of device screen changes.
     */
    func screenBrightnessDidChange()
}

/**
 A `class` that detects changes in screen brightness.
 */
public class ScreenBrightness {
    
    /**
     A delegate that conforms to `ScreenBrightnessMonitoring` protocol.
     */
    public weak var delegate: ScreenBrightnessMonitoring?
    
    /**
     Returns screen brightness value.
     - important: Returned value is between 0 and 1.
     */
    public var brightness: CGFloat {
        get {
            return screen.brightness
        }
    }
    
    /**
     Returns `true` if `screen brightness` is greater than `0.5`.
     */
    public var isLight: Bool {
        get {
            return (self.screen?.brightness > 0.5)
