applicationWillResignActive and setBrightness not working?

后端 未结 6 1211
误落风尘
误落风尘 2021-01-03 20:17

I use [[UIScreen mainScreen]setBrightness: ] (in sdk 5.0) to change the system background light in my app.

The following steps work with my app:

  1. Act

6条回答
  •  感动是毒
    2021-01-03 21:02

    Second to last line, you didn't assign the sysBright variable.

    sysBright = [[NSUserDefaults standardUserDefaults] floatForKey:@"sysBright"];
    [[UIScreen mainScreen] setBrightness:sysBright];        
    

提交回复
热议问题