I found here that to restore brightness on app exit you have to use event applicationWillTerminate
I do it in the following way
- (void)applicationWillTerminate:(UIApplication *)application
{
[UIScreen mainScreen].brightness = initialBackLightLevel;
}
and it does not work. Where can be the issue?