Ask Your Question

iOS - access back camera error

asked 2013-02-19 21:20:02 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >50 is welcome to improve it.

Device : Iphone 5 IOS 6.0 XCode : 4.6 OpenCV lib: 2.4.3

I went through the tutorial, it worked fine in IOS6. However, when I want to switch to camera device on back (it is on front in tutorial), I modified the code:

self.videoCamera.defaultAVCaptureDevicePosition = AVCaptureDevicePositionFront;


self.videoCamera.defaultAVCaptureDevicePosition = AVCaptureDevicePositionBack;

However, there is nothing happened. is this a bug in OpenCV 2.4.3?

Besides, is OpenCV compatible with IOS 5.1 or lower versions? When I ran it in IOS 5.1, there is exceptions:

'NSInvalidUnarchiveOperationException', reason: 
           'Could not instantiate class named NSLayoutConstraint'
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2013-04-11 12:18:52 -0600

ske gravatar image

For the second question you need to uncheck auto layout option in the storyboard.

edit flag offensive delete link more

Question Tools


Asked: 2013-02-19 21:20:02 -0600

Seen: 461 times

Last updated: Apr 11 '13