Every iOS device has the ability to be used as a torch. Developers have access to use this torch through AVCaptureDevice. You can copy this function into your app and using the setTorch boolean parameter, you can switch it on and off. You can also adjust the level of intensity on the torch by adjusting the setTorchModeOn parameter anywhere between 0 and 1 (maximum).
https://gist.github.com/rtking1993/3e251fc1556f91dd1bc3eb006bbd416b
Leave a Reply