Get Current Screen Brightness
<p>Does anyone know how to get the user's current screen brightness or temporarily change the brightness just for one view?</p>

<p>When the user launches a specific view the screen dims to the lowest brightness possible. In this case, I'm using:</p>

<pre><code>UIScreen.mainScreen().brightness = CGFloat(0.0)
</code></pre>

<p>But I want to know that when the user dismisses the view the brightness returns to exactly what they had.</p>

<p>An app that uses this is Stocard. When viewing a card's barcode the screen's brightness brightens to the max and when the barcode view dismisses the screen's brightnes returns to exactly what the user had before.</p>

<p>If anyone knows how to do this in Swift 2.3 that would be great.</p>