简体   繁体   English

如何快速制作带有彩色光的手电筒(iPhone)?

[英]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.我试图阅读 AVFoundation 文档,但找不到任何关于颜色的信息。 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 .虽然有些应用程序可以通过显示色彩鲜艳的屏幕来解决这个问题, 但 iPhone闪光灯只有一个 LED 元件

You do, via AVCaptureDevice , have the ability to change the intensity of torches on some models.您确实可以通过AVCaptureDevice更改某些模型上的手电筒强度。 Take a look at the torchLevel property.看看torchLevel属性。

You could always try an easy hardware hack .你总是可以尝试一个简单的硬件黑客

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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