Issue 411
[zxing.git] / iphone / Classes / MessageViewController.m
index ab6b2bc..886b60c 100644 (file)
@@ -37,7 +37,7 @@
                        target:(id)cbt
                     onSuccess:(SEL)ss 
                     onFailure:(SEL)fs  {
-       if (self = [super initWithNibName:@"Message" bundle:nil]) {
+       if ((self = [super initWithNibName:@"Message" bundle:nil])) {
     self.callbackTarget = cbt;
     self.callbackSelectorSuccess = ss;
     self.callbackSelectorFailure = fs;
@@ -60,7 +60,7 @@
 
 - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
        // Return YES for supported orientations
-       return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
+       return (interfaceOrientation == UIInterfaceOrientationPortrait);
 }
 
 - (void)didReceiveMemoryWarning {