Last active
December 23, 2015 12:59
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-(IBAction)takePhoto:(id)sender | |
{ | |
//zbar | |
ZBarReaderViewController *reader = [ZBarReaderViewController new]; | |
reader.readerDelegate = self; | |
//ZBar Camera 꾸미기 | |
UIView *barcodeview = [[UIView alloc]initWithFrame:CGRectMake(0.0f, 0.0f, 320.0f, 460.0f)]; | |
UIImageView *barcodeup = [[UIImageView alloc]initWithFrame: | |
CGRectMake(20.0f, 20.0f, 280.0f, 324.0f)]; | |
[barcodeup setImage:[UIImage imageNamed:PNG_BOUNDARY2]]; | |
UIImageView *barcodedown = [[UIImageView alloc]initWithFrame: | |
CGRectMake(0.0f, 354.0f, 320.0f,69.0f)]; | |
[barcodedown setImage:[UIImage imageNamed:PNG_DESC1]]; | |
[barcodeview addSubview:barcodeup]; | |
[barcodeview addSubview:barcodedown]; | |
reader.cameraOverlayView = barcodeview; | |
reader.showsZBarControls = TRUE; | |
ZBarImageScanner *scanner = reader.scanner; | |
[scanner setSymbology:ZBAR_I25 config:ZBAR_CFG_ENABLE to:0]; | |
[self presentViewController:reader animated:YES completion:nil]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment