Skip to content

Instantly share code, notes, and snippets.

@KanybekMomukeyev
Created April 11, 2013 01:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KanybekMomukeyev/5360001 to your computer and use it in GitHub Desktop.
Save KanybekMomukeyev/5360001 to your computer and use it in GitHub Desktop.
- (void)viewDidDisappear:(BOOL)animated {
[super viewDidDisappear:animated];
[self.capture stop];
[self.capture.layer removeFromSuperlayer];
self.capture = nil;
}
- (void)viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated];
self.capture = [[ZXCapture alloc] init];
self.capture.delegate = self;
self.capture.rotation = 90.0f;
self.capture.layer.frame = self.view.bounds;
[self.view.layer addSublayer:self.capture.layer];
[self.view bringSubviewToFront:self.decodedLabel];
[self.view bringSubviewToFront:self.scanImageView];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment