lib/extensions/barcode/ext/barcode/platform/iphone/Classes/BarcodeViewController.m in rhodes-3.3.3.beta.4 vs lib/extensions/barcode/ext/barcode/platform/iphone/Classes/BarcodeViewController.m in rhodes-3.3.3

- old
+ new

@@ -152,24 +152,28 @@ resultText.frame = rrect; resultText.textAlignment = UITextAlignmentCenter; resultText.font = [resultText.font fontWithSize:22]; readerView = [[ZBarReaderView alloc] initWithImageScanner:[[ZBarImageScanner alloc] init]];//initWithFrame:srect];//CGRectZero]; + //readerView = [[ZBarReaderView alloc] initWithFrame:srect];//CGRectZero]; + readerView.frame = srect; - readerView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; + readerView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleBottomMargin; readerView.autoresizesSubviews = YES; - readerView.frame = srect; // the delegate receives decode results readerView.readerDelegate = self; //signatureView = [[SignatureView alloc] initWithFrame:CGRectZero]; //signatureView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; //signatureView.autoresizesSubviews = YES; //signatureView.frame = srect; + + self.view.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleBottomMargin; + self.view.autoresizesSubviews = YES; [self.view addSubview:readerView]; [self.view addSubview:resultText]; [self.view addSubview:toolbar]; @@ -254,18 +258,24 @@ //[self.view } //*/ +- (BOOL) shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation) orient +{ + // auto-rotation is supported + return(YES); +} -- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation { +- (void) didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation { + //[readerView willRotateToInterfaceOrientation:self.interfaceOrientation duration:0]; } -- (void) willRotateToInterfaceOrientation: (UIInterfaceOrientation) orient +- (void) willRotateToInterfaceOrientation: (UIInterfaceOrientation) orientation duration: (NSTimeInterval) duration { // compensate for view rotation so camera preview is not rotated - [readerView willRotateToInterfaceOrientation: orient + [readerView willRotateToInterfaceOrientation: orientation duration: duration]; } - (void) viewDidAppear: (BOOL) animated {