Reputation: 1238
I'm using AVFoundation in order to implement barcode scanning. It works well, but I want to decide in which area the barcode has to be centered (for example on the top of the screen). How can I do this?
Upvotes: 1
Views: 1428
Reputation: 428
Set the rectOfInterest on your AVCaptureMetaDataOutput instance:
self.metadataOutput.rectOfInterest = [self.previewLayer metadataOutputRectOfInterestForRect:myRectOfInterest];
Upvotes: 4