简体   繁体   中英

How to make a torch (iPhone) with colored light in swift?

I have tried to read AVFoundation documentation and I can't find anything about colors. Is it possible to change the color to red, green or blue? I think I have seen colored torch apps.

Would it be very hard to write your own code that controlled color hue or lumen of the flashlight?

While there are apps that get around this by display a brightly colored screen , the flash on the iPhone is has a single LED element .

You do, via AVCaptureDevice , have the ability to change the intensity of torches on some models. Take a look at the torchLevel property.

You could always try an easy hardware hack .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM