swift - Getting EXC_BAD_ACESS code =1 When Trying To Capture An Image From Camera -



swift - Getting EXC_BAD_ACESS code =1 When Trying To Capture An Image From Camera -

new issue has come i've moved swift. code worked in objc broken.

func captureimage() { var videoconnection:avcaptureconnection = avcaptureconnection() connection in _stillimageoutput.connections { } }

for reason, if run above loop exc_bad_access code 1 on lastly line.

_stillimageoutput avcapturestillimage object , not nil

commenting out var videoconnection:avcaptureconnection = avcaptureconnection() stops crash.

any ideas?

turns out had nil loop

doing var videoconnection:avcaptureconnection = avcaptureconnection() caused crash.

changing var videoconnection:avcaptureconnection! fixed issue

swift ios8 avfoundation avcapturesession avcapturedevice

Comments

Popular posts from this blog

maven fortify plugin : Unable to load build session with ID XXXXX .. See log file for more details -

c# - Primavera WebServices does not return any data -

android - Display emoji panel with genymotion - keyboard/touch input? -