diff --git a/openbis-ipad/source/objc/openBIS/openBIS.xcodeproj/project.pbxproj b/openbis-ipad/source/objc/openBIS/openBIS.xcodeproj/project.pbxproj index fd0c4822acf761f3ca07a16747d258c222b9acc1..b5944076334809d0392be17357767dfef8df1404 100644 --- a/openbis-ipad/source/objc/openBIS/openBIS.xcodeproj/project.pbxproj +++ b/openbis-ipad/source/objc/openBIS/openBIS.xcodeproj/project.pbxproj @@ -264,6 +264,7 @@ 5D07C0391771CC1100555DE2 /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5D07C0381771CC1100555DE2 /* CoreVideo.framework */; }; 5D07C03B1771CC1F00555DE2 /* ImageIO.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5D07C03A1771CC1F00555DE2 /* ImageIO.framework */; }; 5D07C03D1771CC4700555DE2 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5D07C03C1771CC4600555DE2 /* QuartzCore.framework */; }; + 5DC0467817991FA5009EF79C /* overlaygraphic.png in Resources */ = {isa = PBXBuildFile; fileRef = 5DC0467717991FA5009EF79C /* overlaygraphic.png */; }; 5DC8068E179812C2002D3DB1 /* qrcodeIcon.png in Resources */ = {isa = PBXBuildFile; fileRef = 5DC8068D179812C2002D3DB1 /* qrcodeIcon.png */; }; /* End PBXBuildFile section */ @@ -776,6 +777,7 @@ 5D07C0381771CC1100555DE2 /* CoreVideo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreVideo.framework; path = System/Library/Frameworks/CoreVideo.framework; sourceTree = SDKROOT; }; 5D07C03A1771CC1F00555DE2 /* ImageIO.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ImageIO.framework; path = System/Library/Frameworks/ImageIO.framework; sourceTree = SDKROOT; }; 5D07C03C1771CC4600555DE2 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; + 5DC0467717991FA5009EF79C /* overlaygraphic.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = overlaygraphic.png; sourceTree = "<group>"; }; 5DC8068D179812C2002D3DB1 /* qrcodeIcon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = qrcodeIcon.png; sourceTree = "<group>"; }; /* End PBXFileReference section */ @@ -900,6 +902,7 @@ 36F71E81161C3AE900C87277 /* Supporting Files */ = { isa = PBXGroup; children = ( + 5DC0467717991FA5009EF79C /* overlaygraphic.png */, 5DC8068D179812C2002D3DB1 /* qrcodeIcon.png */, 3656C9C8165ABD4C00E9B0FA /* Zoom-small.png */, 3656C9C5165ABC5D00E9B0FA /* Zoom.png */, @@ -1768,6 +1771,7 @@ 3656C9C6165ABC5D00E9B0FA /* Zoom.png in Resources */, 3656C9C9165ABD4C00E9B0FA /* Zoom-small.png in Resources */, 5DC8068E179812C2002D3DB1 /* qrcodeIcon.png in Resources */, + 5DC0467817991FA5009EF79C /* overlaygraphic.png in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2117,6 +2121,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 5.1; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = NO; }; name = Debug; }; diff --git a/openbis-ipad/source/objc/openBIS/openBIS.xcodeproj/project.xcworkspace/xcuserdata/juanf.xcuserdatad/UserInterfaceState.xcuserstate b/openbis-ipad/source/objc/openBIS/openBIS.xcodeproj/project.xcworkspace/xcuserdata/juanf.xcuserdatad/UserInterfaceState.xcuserstate index 4847be5bbf62c1bb716dfba1935cbdf4d553179b..64d4eb135026813057c9475f237319f0cef645a2 100644 Binary files a/openbis-ipad/source/objc/openBIS/openBIS.xcodeproj/project.xcworkspace/xcuserdata/juanf.xcuserdatad/UserInterfaceState.xcuserstate and b/openbis-ipad/source/objc/openBIS/openBIS.xcodeproj/project.xcworkspace/xcuserdata/juanf.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/openbis-ipad/source/objc/openBIS/openBIS/CISDOBBarcodeViewController.m b/openbis-ipad/source/objc/openBIS/openBIS/CISDOBBarcodeViewController.m index e261da9693290cb4da643be34945549ef008daa6..ed02887ea32195ca34a7a25bd7f9977c086cdcc3 100644 --- a/openbis-ipad/source/objc/openBIS/openBIS/CISDOBBarcodeViewController.m +++ b/openbis-ipad/source/objc/openBIS/openBIS/CISDOBBarcodeViewController.m @@ -46,6 +46,9 @@ [self.capture.layer removeFromSuperlayer]; [self.capture stop]; [self dismissViewControllerAnimated:YES completion:nil]; + [[NSNotificationCenter defaultCenter] + postNotificationName:@"DissmissNotification" + object:nil]; } #pragma mark - Creation/Deletion Methods @@ -83,17 +86,27 @@ // Use the back camera // self.capture.camera = self.capture.back; - self.capture.layer.frame = CGRectMake(0.f, 0.f, 360.f, 360.f); + self.capture.layer.frame = CGRectMake(0.f, 0.f, 768.f, 960.f); [self.cameraView.layer addSublayer: self.capture.layer]; + [self.cameraView bringSubviewToFront:self.decodedLabel]; + + UIImageView *overlayImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"overlaygraphic.png"]]; + [overlayImageView setFrame:CGRectMake((768/2 - 180), 100, 360, 277)]; + [self.cameraView addSubview:overlayImageView]; + [overlayImageView release]; //[self.cameraSession stopRunning]; //[self.previewLayer removeFromSuperlayer]; } -- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation { - return toInterfaceOrientation == UIInterfaceOrientationPortrait; +- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { + return (interfaceOrientation == UIInterfaceOrientationPortrait); +} + +- (NSUInteger)supportedInterfaceOrientations{ + return UIInterfaceOrientationMaskPortrait; } #pragma mark - Private Methods diff --git a/openbis-ipad/source/objc/openBIS/openBIS/CISDOBMasterViewController.m b/openbis-ipad/source/objc/openBIS/openBIS/CISDOBMasterViewController.m index 4e006bbe9ed2e50b72f55d107cfdd8e6b9b628a6..41b895bb067cd6ef6b1253ad62322c385952974d 100644 --- a/openbis-ipad/source/objc/openBIS/openBIS/CISDOBMasterViewController.m +++ b/openbis-ipad/source/objc/openBIS/openBIS/CISDOBMasterViewController.m @@ -67,6 +67,11 @@ selector:@selector(receiveSearchNotification:) name:@"SearchNotification" object:nil]; + [[NSNotificationCenter defaultCenter] + addObserver:self + selector:@selector(receiveDissmissNotification:) + name:@"DissmissNotification" + object:nil]; } - (IBAction)refreshFromServer:(id)sender @@ -310,6 +315,11 @@ [self searchDisplayController: self.searchDisplayController shouldReloadTableForSearchScope: 0]; } +- (void) receiveDissmissNotification:(NSNotification *) notification +{ + self.searchDisplayController.searchBar.selectedScopeButtonIndex = 0; +} + - (BOOL)searchDisplayController:(UISearchDisplayController *)controller shouldReloadTableForSearchString:(NSString *)searchString { self.openBisModel.searchString = searchString; diff --git a/openbis-ipad/source/objc/openBIS/openBIS/en.lproj/MainStoryboard_iPad.storyboard b/openbis-ipad/source/objc/openBIS/openBIS/en.lproj/MainStoryboard_iPad.storyboard index c2a1b0bd29d364931b23f5d191c6c3ed9cd67419..c8a1500b2293867f99fec14e296c883030719e86 100644 --- a/openbis-ipad/source/objc/openBIS/openBIS/en.lproj/MainStoryboard_iPad.storyboard +++ b/openbis-ipad/source/objc/openBIS/openBIS/en.lproj/MainStoryboard_iPad.storyboard @@ -478,47 +478,51 @@ If you are a user of an openBIS server, plese enter the URL and your login detai </navigationItem> </items> </navigationBar> - <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Hold up to a barcode to scan." textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="10" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" preferredMaxLayoutWidth="367" translatesAutoresizingMaskIntoConstraints="NO" id="6wU-An-596"> - <constraints> - <constraint firstAttribute="width" constant="367" id="Mgw-ab-X16"/> - <constraint firstAttribute="height" constant="134" id="yT0-bZ-zpH"/> - </constraints> - <fontDescription key="fontDescription" type="boldSystem" pointSize="22"/> - <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/> - <nil key="highlightedColor"/> - </label> <view userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="1" verticalHuggingPriority="1" horizontalCompressionResistancePriority="1000" verticalCompressionResistancePriority="1000" translatesAutoresizingMaskIntoConstraints="NO" id="vFb-Tp-Uap"> <subviews> - <imageView userInteractionEnabled="NO" contentMode="scaleToFill" image="qrcodeIcon.png" translatesAutoresizingMaskIntoConstraints="NO" id="TMb-No-FGo"/> + <imageView userInteractionEnabled="NO" contentMode="scaleToFill" image="qrcodeIcon.png" translatesAutoresizingMaskIntoConstraints="NO" id="TMb-No-FGo"> + <constraints> + <constraint firstAttribute="height" constant="360" id="DNo-X0-Ads"/> + <constraint firstAttribute="width" constant="360" id="dht-vB-4pV"/> + </constraints> + </imageView> <activityIndicatorView opaque="NO" contentMode="scaleToFill" animating="YES" style="whiteLarge" translatesAutoresizingMaskIntoConstraints="NO" id="hj7-bf-kQR"/> + <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Hold up to a barcode to scan." textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="10" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" preferredMaxLayoutWidth="367" translatesAutoresizingMaskIntoConstraints="NO" id="6wU-An-596"> + <constraints> + <constraint firstAttribute="width" constant="367" id="Mgw-ab-X16"/> + <constraint firstAttribute="height" constant="134" id="yT0-bZ-zpH"/> + </constraints> + <fontDescription key="fontDescription" type="boldSystem" pointSize="22"/> + <color key="textColor" red="1" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/> + <nil key="highlightedColor"/> + </label> </subviews> <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/> <accessibility key="accessibilityConfiguration"> <accessibilityTraits key="traits" none="YES" notEnabled="YES"/> </accessibility> <constraints> - <constraint firstAttribute="width" constant="360" type="user" id="AhB-w2-dO2"/> - <constraint firstItem="TMb-No-FGo" firstAttribute="bottom" secondItem="vFb-Tp-Uap" secondAttribute="bottom" type="default" id="TAL-Gq-T4X"/> - <constraint firstItem="hj7-bf-kQR" firstAttribute="centerX" secondItem="TMb-No-FGo" secondAttribute="centerX" type="default" id="bM1-QU-fdM"/> - <constraint firstItem="TMb-No-FGo" firstAttribute="leading" secondItem="vFb-Tp-Uap" secondAttribute="leading" type="default" id="dF6-Qd-8kW"/> - <constraint firstItem="hj7-bf-kQR" firstAttribute="top" secondItem="vFb-Tp-Uap" secondAttribute="top" constant="156" id="deP-RS-EiH"/> - <constraint firstItem="TMb-No-FGo" firstAttribute="trailing" secondItem="vFb-Tp-Uap" secondAttribute="trailing" type="default" id="g0D-Te-hlh"/> - <constraint firstItem="TMb-No-FGo" firstAttribute="top" secondItem="vFb-Tp-Uap" secondAttribute="top" type="default" id="pid-y2-Kdl"/> - <constraint firstAttribute="height" constant="360" type="user" id="zx2-gM-LXw"/> + <constraint firstItem="hj7-bf-kQR" firstAttribute="centerX" secondItem="TMb-No-FGo" secondAttribute="centerX" type="default" id="3re-JE-D66"/> + <constraint firstAttribute="centerY" secondItem="TMb-No-FGo" secondAttribute="centerY" type="user" id="O9h-Gn-OBR"/> + <constraint firstAttribute="centerX" secondItem="hj7-bf-kQR" secondAttribute="centerX" type="user" id="RTh-W9-8J6"/> + <constraint firstItem="hj7-bf-kQR" firstAttribute="centerX" secondItem="6wU-An-596" secondAttribute="centerX" type="default" id="ZOb-NB-byv"/> + <constraint firstItem="6wU-An-596" firstAttribute="top" secondItem="vFb-Tp-Uap" secondAttribute="top" constant="-12" id="gg2-fo-Jgf"/> + <constraint firstItem="hj7-bf-kQR" firstAttribute="top" secondItem="vFb-Tp-Uap" secondAttribute="top" constant="455" id="xbz-s6-DP9"/> </constraints> </view> </subviews> <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> <constraints> - <constraint firstAttribute="centerX" secondItem="vFb-Tp-Uap" secondAttribute="centerX" type="user" id="Eeb-R7-DTj"/> - <constraint firstAttribute="centerY" secondItem="vFb-Tp-Uap" secondAttribute="centerY" type="user" id="Iz9-PT-7DJ"/> - <constraint firstItem="6wU-An-596" firstAttribute="centerX" secondItem="wRF-uy-Ag3" secondAttribute="centerX" type="user" id="LUG-x8-d0q"/> - <constraint firstItem="vFb-Tp-Uap" firstAttribute="top" secondItem="6wU-An-596" secondAttribute="bottom" constant="8" symbolic="YES" type="user" id="RxQ-JG-e8a"/> + <constraint firstItem="vFb-Tp-Uap" firstAttribute="bottom" secondItem="yix-wn-HfT" secondAttribute="bottom" type="default" id="0df-p0-cop"/> + <constraint firstItem="vFb-Tp-Uap" firstAttribute="trailing" secondItem="yix-wn-HfT" secondAttribute="trailing" type="default" id="EPU-lV-3qg"/> + <constraint firstItem="vFb-Tp-Uap" firstAttribute="top" secondItem="wRF-uy-Ag3" secondAttribute="bottom" type="default" id="JFQ-nN-wuY"/> + <constraint firstItem="vFb-Tp-Uap" firstAttribute="leading" secondItem="yix-wn-HfT" secondAttribute="leading" type="default" id="LxQ-Yh-tMQ"/> <constraint firstItem="wRF-uy-Ag3" firstAttribute="trailing" secondItem="yix-wn-HfT" secondAttribute="trailing" type="user" id="T3M-Yb-4yG"/> <constraint firstItem="wRF-uy-Ag3" firstAttribute="leading" secondItem="yix-wn-HfT" secondAttribute="leading" type="user" id="dAA-nq-FWn"/> <constraint firstItem="wRF-uy-Ag3" firstAttribute="top" secondItem="yix-wn-HfT" secondAttribute="top" type="default" id="qFw-C2-feX"/> </constraints> </view> + <simulatedOrientationMetrics key="simulatedOrientationMetrics"/> <connections> <outlet property="cameraView" destination="vFb-Tp-Uap" id="u7B-v1-i9E"/> <outlet property="decodedLabel" destination="6wU-An-596" id="tZ6-5s-Dju"/> diff --git a/openbis-ipad/source/objc/openBIS/openBIS/overlaygraphic.png b/openbis-ipad/source/objc/openBIS/openBIS/overlaygraphic.png new file mode 100755 index 0000000000000000000000000000000000000000..69e659c321d57cde903772ae2e49e064aab72a51 Binary files /dev/null and b/openbis-ipad/source/objc/openBIS/openBIS/overlaygraphic.png differ