i'm trying lock iphone facing camera's white balance current state having trouble point of converting objective-c code swift. code in objective-c:
[device setwhitebalancemode:avcapturewhitebalancemodelocked];
this thought code in swift should like:
capturedevice.setwhitebalancemode(avcapturewhitebalancemode.locked)
and xcode tells me this:
'avcapturedevice' not have member named 'setwhitebalancemode'
if capturedevice.lockforconfiguration(nil) { var gains: avcapturewhitebalancegains = avcapturewhitebalancegainscurrent capturedevice.setwhitebalancemodelockedwithdevicewhitebalancegains(gains, completionhandler:nil); capturedevice.unlockforconfiguration() }