Created
July 18, 2012 13:01
-
-
Save pulkitsinghal/3136074 to your computer and use it in GitHub Desktop.
Scan line indicator for ZBar overlays
This file contains hidden or 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
| - (UIView *) loadCameraOverlayView | |
| { | |
| NSString *nibName = @"CameraOverlayView"; | |
| NSArray *loadedObjects = [[NSBundle mainBundle] loadNibNamed:nibName owner:nil options:nil]; | |
| UIView *overlayView = [loadedObjects lastObject]; | |
| overlayView.backgroundColor = [UIColor clearColor]; | |
| UIImageView *imageView = (UIImageView*)[overlayView viewWithTag:2]; | |
| UIImage *image = [UIImage imageNamed:"red_neon_line_320x10.png"]; | |
| imageView.image = image; | |
| [UIView animateWithDuration:1.5 | |
| delay:0.0 | |
| options:(UIViewAnimationOptionRepeat | | |
| UIViewAnimationOptionAutoreverse | | |
| UIViewAnimationOptionAllowUserInteraction) | |
| animations:^{ | |
| imageView.center = CGPointMake(imageView.center.x, imageView.center.y + 280); | |
| } | |
| completion:^(BOOL finished){ | |
| } | |
| ]; | |
| //... | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment