Skip to content
Snippets Groups Projects
Commit 3e8e701e authored by juanf's avatar juanf
Browse files

SP-787 BIS-500 Changing orientation after going in/out of barcode when...

SP-787 BIS-500 Changing orientation after going in/out of barcode when rotating device before new one appears glitch fix.

SVN: 29596
parent 4da535ad
No related branches found
No related tags found
No related merge requests found
......@@ -29,8 +29,13 @@
// Do any additional setup after loading the view.
[[NSNotificationCenter defaultCenter]
addObserver:self
selector:@selector(switchAutoRotate:)
name:@"BarcodeReaderSwitchAutoRotation"
selector:@selector(switchAutoRotateOn:)
name:@"BarcodeReaderSwitchAutoRotationOn"
object:nil];
[[NSNotificationCenter defaultCenter]
addObserver:self
selector:@selector(switchAutoRotateOff:)
name:@"BarcodeReaderSwitchAutoRotationOff"
object:nil];
}
......@@ -42,9 +47,14 @@
static BOOL shouldAutorotate = YES;
- (void) switchAutoRotate:(NSNotification *) notification
- (void) switchAutoRotateOn:(NSNotification *) notification
{
shouldAutorotate = YES;
}
- (void) switchAutoRotateOff:(NSNotification *) notification
{
shouldAutorotate = !shouldAutorotate;
shouldAutorotate = NO;
}
- (BOOL)shouldAutorotate
......
......@@ -50,7 +50,7 @@
postNotificationName:@"DissmissNotification"
object:nil];
[[NSNotificationCenter defaultCenter]
postNotificationName:@"BarcodeReaderSwitchAutoRotation"
postNotificationName:@"BarcodeReaderSwitchAutoRotationOn"
object:nil];
}
......@@ -70,9 +70,6 @@
#pragma mark - View Controller Methods
- (void)viewWillAppear:(BOOL)animated {
[[NSNotificationCenter defaultCenter]
postNotificationName:@"BarcodeReaderSwitchAutoRotation"
object:nil];
/*
self.videoDevice = [AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeVideo];
NSError *error;
......
......@@ -341,6 +341,9 @@
//Searching for barcodes or normal search
NSString* searchTitle = [self scopeButtonTitles][searchOption];
if ([searchTitle isEqualToString:@"Barcode"]) {
[[NSNotificationCenter defaultCenter]
postNotificationName:@"BarcodeReaderSwitchAutoRotationOff"
object:nil];
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard_iPad" bundle:nil];
CISDOBBarcodeViewController *barcodeController = [storyboard instantiateViewControllerWithIdentifier:@"Barcode"];
barcodeController.modalPresentationStyle = UIModalPresentationFullScreen;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment