Skip to content

Commit

Permalink
iOS fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathannaguin committed Apr 24, 2014
1 parent 56ae5c6 commit 36732e8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/ios/CaptureBarcodesViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,13 @@ - (void)viewWillDisappear:(BOOL)animated{
[super viewWillDisappear:animated];

self.delegate = nil;

[self stopCapture];
}

- (void)viewDidDisappear:(BOOL)animated {
[super viewDidDisappear:animated];
[_highlightView removeFromSuperview];
[self stopCapture];
}

#pragma mark - Cancel delegate
Expand Down Expand Up @@ -181,7 +182,6 @@ - (void)startCapture {
[_highlightView reset];
[_session startRunning];
}

}

- (void)stopCapture {
Expand All @@ -191,6 +191,7 @@ - (void)stopCapture {
[_timer invalidate];
_timer = nil;
[_session stopRunning];
_session = nil;
}
}

Expand Down

0 comments on commit 36732e8

Please sign in to comment.