Explorar el Código

화면 constraint 수정

서용하 hace 6 años
padre
commit
259389b278

+ 2 - 2
MCPlus.xcodeproj/project.pbxproj

@@ -2918,7 +2918,7 @@
 				IPHONEOS_DEPLOYMENT_TARGET = 9.0;
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
 				LIBRARY_SEARCH_PATHS = "$(inherited)";
-				OTHER_SWIFT_FLAGS = "$(inherited) \"-DDEBUG\"  -D SEOUL";
+				OTHER_SWIFT_FLAGS = "$(inherited) \"-DDEBUG\"  -D HAEUNDAE";
 				PRODUCT_BUNDLE_IDENTIFIER = com.dbs.mplus.paik;
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				PROVISIONING_PROFILE_SPECIFIER = "";
@@ -2951,7 +2951,7 @@
 				IPHONEOS_DEPLOYMENT_TARGET = 9.0;
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
 				LIBRARY_SEARCH_PATHS = "$(inherited)";
-				OTHER_SWIFT_FLAGS = "$(inherited) -D COCOAPODS  -D SEOUL";
+				OTHER_SWIFT_FLAGS = "$(inherited) -D COCOAPODS -D HAEUNDAE";
 				PRODUCT_BUNDLE_IDENTIFIER = com.dbs.mplus.paik;
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				PROVISIONING_PROFILE_SPECIFIER = "";

+ 1 - 1
MCPlus/Adapter/PhotoCollectionViewAdapter.swift

@@ -58,7 +58,7 @@ extension PhotoCollectionViewAdapter:UICollectionViewDataSource, UICollectionVie
         }else{
             cell.album.borderWidth = 0
         }
-        
+        cell.album.image = image
         
         //체크가 되었을 경우 표시를 다르게 한다
         if self.selectedArr.contains(indexPath){

+ 14 - 9
MCPlus/Base.lproj/Main.storyboard

@@ -147,9 +147,8 @@
                                     <segue destination="vG9-SK-zG4" kind="embed" id="9hA-fj-dZ7"/>
                                 </connections>
                             </containerView>
-                            <containerView hidden="YES" opaque="NO" contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="4Ae-P7-0Xz">
-                                <rect key="frame" x="0.0" y="39" width="375" height="734"/>
-                                <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
+                            <containerView hidden="YES" opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="4Ae-P7-0Xz">
+                                <rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
                                 <connections>
                                     <segue destination="HAU-b8-2L8" kind="embed" id="fhe-kt-nhW"/>
                                 </connections>
@@ -157,10 +156,14 @@
                         </subviews>
                         <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                         <constraints>
+                            <constraint firstAttribute="bottom" secondItem="4Ae-P7-0Xz" secondAttribute="bottom" id="0Sq-7o-q3j"/>
                             <constraint firstAttribute="bottom" secondItem="Pub-Ed-9mn" secondAttribute="bottom" id="0t7-YQ-eib"/>
+                            <constraint firstItem="4Ae-P7-0Xz" firstAttribute="top" secondItem="cey-dQ-ZA5" secondAttribute="top" id="8LR-QM-0R7"/>
                             <constraint firstItem="Pub-Ed-9mn" firstAttribute="top" secondItem="cey-dQ-ZA5" secondAttribute="top" id="AeE-63-h1L"/>
                             <constraint firstItem="Pub-Ed-9mn" firstAttribute="leading" secondItem="2PI-m1-5tR" secondAttribute="leading" id="IX1-b3-LRR"/>
+                            <constraint firstItem="4Ae-P7-0Xz" firstAttribute="trailing" secondItem="2PI-m1-5tR" secondAttribute="trailing" id="ho1-uJ-vN9"/>
                             <constraint firstItem="2PI-m1-5tR" firstAttribute="trailing" secondItem="Pub-Ed-9mn" secondAttribute="trailing" id="vQ0-Cb-iTu"/>
+                            <constraint firstItem="4Ae-P7-0Xz" firstAttribute="leading" secondItem="2PI-m1-5tR" secondAttribute="leading" id="zf0-Ap-djz"/>
                         </constraints>
                         <viewLayoutGuide key="safeArea" id="2PI-m1-5tR"/>
                     </view>
@@ -501,6 +504,7 @@
                     <connections>
                         <outlet property="ageGenderLabel" destination="KLU-Vc-9DU" id="9qX-zA-yzR"/>
                         <outlet property="albumButton" destination="944-gk-cQs" id="Zy7-fP-rZ2"/>
+                        <outlet property="closeButton" destination="Vnl-oE-eK1" id="nNQ-Om-7nv"/>
                         <outlet property="finishButton" destination="Wva-cH-tSz" id="8nH-zd-8rW"/>
                         <outlet property="patientIdLabel" destination="4un-kx-8PH" id="g6I-qh-Jwn"/>
                         <outlet property="patientNmLabel" destination="ZS3-lT-QK3" id="SOC-12-WBf"/>
@@ -517,11 +521,11 @@
             <objects>
                 <viewController storyboardIdentifier="PhotoViewController" useStoryboardIdentifierAsRestorationIdentifier="YES" id="HAU-b8-2L8" customClass="PhotoViewController" customModule="kunkuk" customModuleProvider="target" sceneMemberID="viewController">
                     <view key="view" contentMode="scaleToFill" id="XAP-9P-NF8">
-                        <rect key="frame" x="0.0" y="0.0" width="375" height="734"/>
+                        <rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                         <subviews>
                             <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Zli-63-5CU">
-                                <rect key="frame" x="0.0" y="44" width="375" height="656"/>
+                                <rect key="frame" x="0.0" y="44" width="375" height="734"/>
                                 <subviews>
                                     <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="jJc-rS-Zz1">
                                         <rect key="frame" x="0.0" y="0.0" width="375" height="48"/>
@@ -743,7 +747,7 @@
                                         </userDefinedRuntimeAttributes>
                                     </stackView>
                                     <collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="jxM-6x-cdr">
-                                        <rect key="frame" x="8" y="166" width="359" height="400"/>
+                                        <rect key="frame" x="8" y="166" width="359" height="478"/>
                                         <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                         <collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="40" minimumInteritemSpacing="10" id="RHq-rA-QGF">
                                             <size key="itemSize" width="50" height="50"/>
@@ -818,7 +822,7 @@
                                         </collectionReusableView>
                                     </collectionView>
                                     <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="5S7-UW-OKn">
-                                        <rect key="frame" x="0.0" y="566" width="375" height="40"/>
+                                        <rect key="frame" x="0.0" y="644" width="375" height="40"/>
                                         <subviews>
                                             <stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" translatesAutoresizingMaskIntoConstraints="NO" id="Dps-Yw-UhW">
                                                 <rect key="frame" x="0.0" y="0.0" width="375" height="40"/>
@@ -898,7 +902,7 @@
                                         </constraints>
                                     </view>
                                     <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="o06-9o-mAW">
-                                        <rect key="frame" x="8" y="606" width="359" height="50"/>
+                                        <rect key="frame" x="8" y="684" width="359" height="50"/>
                                         <subviews>
                                             <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Mfw-5C-ES1">
                                                 <rect key="frame" x="159" y="0.0" width="50" height="50"/>
@@ -995,6 +999,7 @@
                         <outlet property="allUserAlbumLabel" destination="5Bj-pK-noF" id="nAB-ww-HN9"/>
                         <outlet property="cameraButton" destination="Mfw-5C-ES1" id="fdI-ee-YgL"/>
                         <outlet property="cancelButton" destination="Lat-0u-BFo" id="ac4-hb-Azl"/>
+                        <outlet property="closeButton" destination="FQZ-R2-nMR" id="oul-w8-NcW"/>
                         <outlet property="deleteButton" destination="bCe-v6-zcW" id="60s-Nl-A9a"/>
                         <outlet property="okButton" destination="Kib-cX-gbE" id="fHW-RJ-rt5"/>
                         <outlet property="patientIdLabel" destination="wHc-QH-9WF" id="FrJ-h7-ReF"/>
@@ -1375,7 +1380,7 @@
                                 <rect key="frame" x="0.0" y="44" width="375" height="48"/>
                                 <subviews>
                                     <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="스캔" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Tzg-sE-Hgh">
-                                        <rect key="frame" x="170.33333333333334" y="13.666666666666664" width="34.666666666666657" height="21"/>
+                                        <rect key="frame" x="171" y="12.999999999999998" width="33" height="22.333333333333329"/>
                                         <fontDescription key="fontDescription" name="NanumSquareB" family="NanumSquare" pointSize="19"/>
                                         <nil key="textColor"/>
                                         <nil key="highlightedColor"/>

+ 2 - 2
MCPlus/CustomFiles/kunkuk/Info.plist

@@ -15,7 +15,7 @@
 	<key>CFBundlePackageType</key>
 	<string>APPL</string>
 	<key>CFBundleShortVersionString</key>
-	<string>150</string>
+	<string>23</string>
 	<key>CFBundleURLTypes</key>
 	<array>
 		<dict>
@@ -30,7 +30,7 @@
 		</dict>
 	</array>
 	<key>CFBundleVersion</key>
-	<string>150</string>
+	<string>23</string>
 	<key>DomainName</key>
 	<string>https://app.hyumc.com/</string>
 	<key>Fabric</key>

+ 6 - 4
MCPlus/Model/Photo.swift

@@ -183,8 +183,8 @@ extension Photo{
             var photos = [Photo]()
             while result?.next() == true{
                 let photo = Photo()
-                let user = User()
-                photo.user = user
+                let _user = User()
+                photo.user = _user
                 photo.user?.patientId = result?.string(forColumn: "userId")
                 photo.file = result?.string(forColumn: "fileName")
                 photo.key = result?.string(forColumn: "fileKey")
@@ -221,8 +221,8 @@ extension Photo{
             while result?.next() == true{
                 
                 let photo = Photo()
-                let user = User()
-                photo.user = user
+                let _user = User()
+                photo.user = _user
                 photo.user?.patientId = result?.string(forColumn: "userId")
                 photo.file = result?.string(forColumn: "fileName")
                 photo.key = result?.string(forColumn: "fileKey")
@@ -245,6 +245,8 @@ extension Photo{
     }
     
     static func filter(_ photo:Photo, _ user:User) -> Bool {
+        print(photo)
+        print(user)
         if photo.user?.userId != user.userId{
             return false
         }

+ 14 - 4
MCPlus/ViewControllers/CustomCameraViewController.swift

@@ -51,6 +51,11 @@ class CustomCameraViewController: UIViewController {
         }
     }
     
+    @IBOutlet weak var closeButton: UIImageView!{
+        didSet{
+            closeButton.addTapGestureRecognizer(action: self.finish)
+        }
+    }
     
     
     var session: AVCaptureSession?
@@ -102,9 +107,9 @@ extension CustomCameraViewController{
                 videoPreviewLayer!.videoGravity =    AVLayerVideoGravity.resizeAspect
                 videoPreviewLayer!.connection?.videoOrientation =   AVCaptureVideoOrientation.portrait
                 previewView.layer.addSublayer(videoPreviewLayer!)
-                if let size = previewView?.bounds.size{
-                    videoPreviewLayer?.frame.size = size
-                }
+        
+                
+                
                 videoPreviewLayer?.videoGravity = .resizeAspectFill
                 session!.startRunning()
             }
@@ -115,7 +120,12 @@ extension CustomCameraViewController{
     
     override func viewDidAppear(_ animated: Bool) {
         super.viewDidAppear(animated)
-        videoPreviewLayer!.frame = previewView.bounds
+        
+    }
+    
+    override func viewDidLayoutSubviews() {
+        super.viewDidLayoutSubviews()
+        videoPreviewLayer?.frame = previewView.bounds
     }
     
     func finish(){

+ 11 - 4
MCPlus/ViewControllers/PhotoViewController.swift

@@ -88,6 +88,11 @@ class PhotoViewController: UIViewController{
         }
     }
     
+    @IBOutlet weak var closeButton: UIImageView!{
+        didSet{
+            closeButton.addTapGestureRecognizer(action: self.cancelAction)
+        }
+    }
     
     
     let adapter = PhotoCollectionViewAdapter()
@@ -104,10 +109,11 @@ extension PhotoViewController{
         super.viewDidLoad()
         
         PictureViewController.patientId.signal.observe { [weak self](item) in
-            guard let value = item.value else{ return }
-            let user = User()
-            user.patientId = value
-            self?.list.value = Photo.list(user: user)
+            guard let _ = item.value else{ return }
+            
+            if let VC = self?.parent as? PictureViewController, let user = VC.user{
+                self?.list.value = Photo.list(user: user)
+            }
         }
         
         //이미지 프로세싱 완료처리
@@ -116,6 +122,7 @@ extension PhotoViewController{
                 self?.reloadTable()
             }
         }
+        
     }
     
     override func viewWillLayoutSubviews() {

+ 5 - 5
MCPlus/ViewControllers/PictureViewController.swift

@@ -32,12 +32,12 @@ extension PictureViewController{
     override func viewDidLoad() {
         super.viewDidLoad()
         
+        self.navigationController?.isNavigationBarHidden = true
+//        if let testData = "{\"hospitalCD\":\"1000001\",\"patientId\":\"김길동\",\"userId\":\"20\",\"patientNm\":\"M\",\"age\":\"M\",\"gender\":\"M\",\"deptCd\":\"M\",\"deptNm\":\"M\",\"doctorId\":\"M\",\"doctorNm\":\"M\",\"treatCls\":\"M\"}".data(using: .utf8){
+//            user = try? JSONDecoder().decode(User.self, from: testData)
+//            print(user)
+//        }
         
-        if let testData = "{\"hospitalCD\":\"1000001\",\"patientId\":\"김길동\",\"userId\":\"20\",\"patientNm\":\"M\",\"age\":\"M\",\"gender\":\"M\",\"deptCd\":\"M\",\"deptNm\":\"M\",\"doctorId\":\"M\",\"doctorNm\":\"M\",\"treatCls\":\"M\"}".data(using: .utf8){
-            user = try? JSONDecoder().decode(User.self, from: testData)
-            print(user)
-        }
-
         PictureViewController.patientId.value = user?.patientId
         PictureViewController.patientNm.value = user?.patientNm
         PictureViewController.ageGender.value = "\(user?.age ?? "") / \(user?.gender ?? "")"

+ 1 - 1
MCPlus/ViewControllers/WebViewController.swift

@@ -511,7 +511,7 @@ extension WebViewController:WKUIDelegate, WKNavigationDelegate, WKScriptMessageH
     func webView(_ webView: WKWebView, decidePolicyFor navigationAction: WKNavigationAction, decisionHandler: @escaping ((WKNavigationActionPolicy) -> Void)) {
         
         let request = navigationAction.request
-        
+        print(request)
         guard let url = request.url else {
             return
         }