From ded5abec31b5b1e2c381c7ef17644064aa93ccf8 Mon Sep 17 00:00:00 2001 From: "christian.brunschen" Date: Thu, 19 Jun 2008 14:02:47 +0000 Subject: [PATCH] Removed redundant RotatingNavigationController class git-svn-id: http://zxing.googlecode.com/svn/trunk@445 59b500cc-1b3d-0410-9834-0bbf25fbcc57 --- iphone/Classes/DecoderViewController.m | 2 +- iphone/Classes/RotatingNavigationController.h | 29 ----------------- iphone/Classes/RotatingNavigationController.m | 31 ------------------- iphone/Classes/ZXingAppDelegate.m | 5 ++- iphone/ZXing.xcodeproj/project.pbxproj | 10 +++--- 5 files changed, 7 insertions(+), 70 deletions(-) delete mode 100644 iphone/Classes/RotatingNavigationController.h delete mode 100644 iphone/Classes/RotatingNavigationController.m diff --git a/iphone/Classes/DecoderViewController.m b/iphone/Classes/DecoderViewController.m index 02a087c4..4b57d980 100644 --- a/iphone/Classes/DecoderViewController.m +++ b/iphone/Classes/DecoderViewController.m @@ -134,7 +134,7 @@ - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { // Return YES for supported orientations - return YES; + return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown); } diff --git a/iphone/Classes/RotatingNavigationController.h b/iphone/Classes/RotatingNavigationController.h deleted file mode 100644 index 783cae3a..00000000 --- a/iphone/Classes/RotatingNavigationController.h +++ /dev/null @@ -1,29 +0,0 @@ -// -// RotatingNavigationViewController.h -// ZXing -// -// Created by Christian Brunschen on 29/05/2008. -/* - * Copyright 2008 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#import - - -@interface RotatingNavigationController : UINavigationController { - -} - -@end diff --git a/iphone/Classes/RotatingNavigationController.m b/iphone/Classes/RotatingNavigationController.m deleted file mode 100644 index b3da0cfd..00000000 --- a/iphone/Classes/RotatingNavigationController.m +++ /dev/null @@ -1,31 +0,0 @@ -// -// RotatingNavigationViewController.m -// ZXing -// -// Created by Christian Brunschen on 29/05/2008. -/* - * Copyright 2008 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#import "RotatingNavigationController.h" - - -@implementation RotatingNavigationController - -- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { - return YES; -} - -@end diff --git a/iphone/Classes/ZXingAppDelegate.m b/iphone/Classes/ZXingAppDelegate.m index 6ee99e33..999965c7 100644 --- a/iphone/Classes/ZXingAppDelegate.m +++ b/iphone/Classes/ZXingAppDelegate.m @@ -23,7 +23,6 @@ #import "ZXingAppDelegate.h" #import "DecoderViewController.h" -#import "RotatingNavigationController.h" @implementation ZXingAppDelegate @@ -35,11 +34,11 @@ /* create the view controller */ DecoderViewController *vc = [[DecoderViewController alloc] initWithNibName:@"DecoderView" - bundle:[NSBundle mainBundle]]; + bundle:[NSBundle mainBundle]]; self.viewController = vc; [vc release]; - navigationController = [[RotatingNavigationController alloc] + navigationController = [[UINavigationController alloc] initWithRootViewController:viewController]; // hook up the view controller's view to be in the window diff --git a/iphone/ZXing.xcodeproj/project.pbxproj b/iphone/ZXing.xcodeproj/project.pbxproj index 2199e407..e568250b 100755 --- a/iphone/ZXing.xcodeproj/project.pbxproj +++ b/iphone/ZXing.xcodeproj/project.pbxproj @@ -58,12 +58,12 @@ 852683A20DF851ED005DD4C0 /* GeoParsedResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 852683A10DF851ED005DD4C0 /* GeoParsedResult.m */; }; 852683C20DF8562B005DD4C0 /* ShowMapAction.m in Sources */ = {isa = PBXBuildFile; fileRef = 852683C10DF8562B005DD4C0 /* ShowMapAction.m */; }; 854BE3010E06A56C00CB4A20 /* AddressBookUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 854BE3000E06A56C00CB4A20 /* AddressBookUI.framework */; }; + 8552C4980E0A61D6000CC4F0 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 8552C4970E0A61D6000CC4F0 /* Default.png */; }; 855A66800DF5E757007B394F /* ArchiveController.m in Sources */ = {isa = PBXBuildFile; fileRef = 855A66510DF5E757007B394F /* ArchiveController.m */; }; 855A66810DF5E757007B394F /* Database.m in Sources */ = {isa = PBXBuildFile; fileRef = 855A66540DF5E757007B394F /* Database.m */; }; 855A66820DF5E757007B394F /* AddressBookAUParsedResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 855A66560DF5E757007B394F /* AddressBookAUParsedResult.m */; }; 855A66830DF5E757007B394F /* AddContactAction.m in Sources */ = {isa = PBXBuildFile; fileRef = 855A66580DF5E757007B394F /* AddContactAction.m */; }; 855A66840DF5E757007B394F /* AddressBookDoCoMoParsedResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 855A665A0DF5E757007B394F /* AddressBookDoCoMoParsedResult.m */; }; - 855A66850DF5E757007B394F /* RotatingNavigationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 855A665C0DF5E757007B394F /* RotatingNavigationController.m */; }; 855A66860DF5E757007B394F /* EmailAction.m in Sources */ = {isa = PBXBuildFile; fileRef = 855A665E0DF5E757007B394F /* EmailAction.m */; }; 855A66870DF5E757007B394F /* EmailDoCoMoParsedResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 855A66600DF5E757007B394F /* EmailDoCoMoParsedResult.m */; }; 855A66880DF5E757007B394F /* DoCoMoParsedResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 855A66620DF5E757007B394F /* DoCoMoParsedResult.m */; }; @@ -145,6 +145,7 @@ 852683C00DF8562B005DD4C0 /* ShowMapAction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShowMapAction.h; sourceTree = ""; }; 852683C10DF8562B005DD4C0 /* ShowMapAction.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ShowMapAction.m; sourceTree = ""; }; 854BE3000E06A56C00CB4A20 /* AddressBookUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBookUI.framework; path = System/Library/Frameworks/AddressBookUI.framework; sourceTree = SDKROOT; }; + 8552C4970E0A61D6000CC4F0 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = ""; }; 855A65D70DF5E739007B394F /* BarcodeFormat.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BarcodeFormat.cpp; sourceTree = ""; }; 855A65D80DF5E739007B394F /* BarcodeFormat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BarcodeFormat.h; sourceTree = ""; }; 855A65D90DF5E739007B394F /* BlackPointEstimationMethod.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BlackPointEstimationMethod.cpp; sourceTree = ""; }; @@ -233,8 +234,6 @@ 855A66580DF5E757007B394F /* AddContactAction.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AddContactAction.m; sourceTree = ""; }; 855A66590DF5E757007B394F /* AddressBookDoCoMoParsedResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AddressBookDoCoMoParsedResult.h; sourceTree = ""; }; 855A665A0DF5E757007B394F /* AddressBookDoCoMoParsedResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AddressBookDoCoMoParsedResult.m; sourceTree = ""; }; - 855A665B0DF5E757007B394F /* RotatingNavigationController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RotatingNavigationController.h; sourceTree = ""; }; - 855A665C0DF5E757007B394F /* RotatingNavigationController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RotatingNavigationController.m; sourceTree = ""; }; 855A665D0DF5E757007B394F /* EmailAction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EmailAction.h; sourceTree = ""; }; 855A665E0DF5E757007B394F /* EmailAction.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EmailAction.m; sourceTree = ""; }; 855A665F0DF5E757007B394F /* EmailDoCoMoParsedResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EmailDoCoMoParsedResult.h; sourceTree = ""; }; @@ -331,8 +330,6 @@ 855A66580DF5E757007B394F /* AddContactAction.m */, 855A66590DF5E757007B394F /* AddressBookDoCoMoParsedResult.h */, 855A665A0DF5E757007B394F /* AddressBookDoCoMoParsedResult.m */, - 855A665B0DF5E757007B394F /* RotatingNavigationController.h */, - 855A665C0DF5E757007B394F /* RotatingNavigationController.m */, 855A665D0DF5E757007B394F /* EmailAction.h */, 855A665E0DF5E757007B394F /* EmailAction.m */, 855A665F0DF5E757007B394F /* EmailDoCoMoParsedResult.h */, @@ -415,6 +412,7 @@ 855A66A30DF5E7B4007B394F /* DecoderView.xib */, 855A66A40DF5E7B4007B394F /* MainWindow.xib */, 8D1107310486CEB800E47090 /* Info.plist */, + 8552C4970E0A61D6000CC4F0 /* Default.png */, ); name = Resources; sourceTree = ""; @@ -707,6 +705,7 @@ 855A66A70DF5E7B4007B394F /* zxing-icon-128.png in Resources */, 855A66A80DF5E7B4007B394F /* DecoderView.xib in Resources */, 855A66A90DF5E7B4007B394F /* MainWindow.xib in Resources */, + 8552C4980E0A61D6000CC4F0 /* Default.png in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -723,7 +722,6 @@ 855A66820DF5E757007B394F /* AddressBookAUParsedResult.m in Sources */, 855A66830DF5E757007B394F /* AddContactAction.m in Sources */, 855A66840DF5E757007B394F /* AddressBookDoCoMoParsedResult.m in Sources */, - 855A66850DF5E757007B394F /* RotatingNavigationController.m in Sources */, 855A66860DF5E757007B394F /* EmailAction.m in Sources */, 855A66870DF5E757007B394F /* EmailDoCoMoParsedResult.m in Sources */, 855A66880DF5E757007B394F /* DoCoMoParsedResult.m in Sources */, -- 2.20.1