marinofaggiana %!s(int64=3) %!d(string=hai) anos
pai
achega
2fe163ff8b

+ 25 - 0
iOSClient/Security/NCViewCertificateDetails.storyboard

@@ -4,6 +4,7 @@
     <dependencies>
         <deployment identifier="iOS"/>
         <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="18093"/>
+        <capability name="System colors in document resources" minToolsVersion="11.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <scenes>
@@ -21,6 +22,21 @@
                         <subviews>
                             <scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" directionalLockEnabled="YES" delaysContentTouches="NO" translatesAutoresizingMaskIntoConstraints="NO" id="IrK-3z-fms">
                                 <rect key="frame" x="0.0" y="88" width="414" height="774"/>
+                                <subviews>
+                                    <textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" scrollEnabled="NO" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" editable="NO" textAlignment="natural" selectable="NO" translatesAutoresizingMaskIntoConstraints="NO" id="WsH-pm-r11">
+                                        <rect key="frame" x="0.0" y="0.0" width="10" height="33"/>
+                                        <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+                                        <color key="textColor" systemColor="labelColor"/>
+                                        <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                                        <textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
+                                    </textView>
+                                </subviews>
+                                <constraints>
+                                    <constraint firstItem="WsH-pm-r11" firstAttribute="leading" secondItem="IrK-3z-fms" secondAttribute="leading" id="JjL-uK-kjZ"/>
+                                    <constraint firstAttribute="bottom" secondItem="WsH-pm-r11" secondAttribute="bottom" id="liC-tc-sE8"/>
+                                    <constraint firstAttribute="trailing" secondItem="WsH-pm-r11" secondAttribute="trailing" id="lky-t0-Za7"/>
+                                    <constraint firstItem="WsH-pm-r11" firstAttribute="top" secondItem="IrK-3z-fms" secondAttribute="top" id="yBD-CG-V6d"/>
+                                </constraints>
                                 <connections>
                                     <outlet property="delegate" destination="BYZ-38-t0r" id="KgR-kV-oXD"/>
                                 </connections>
@@ -44,6 +60,7 @@
                     <connections>
                         <outlet property="buttonCancel" destination="hMa-Vi-h4E" id="TKS-UQ-fdG"/>
                         <outlet property="scrollView" destination="IrK-3z-fms" id="Bxc-Ka-jnB"/>
+                        <outlet property="textView" destination="WsH-pm-r11" id="eyo-tQ-6Ad"/>
                     </connections>
                 </viewController>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
@@ -69,4 +86,12 @@
             <point key="canvasLocation" x="18.840579710144929" y="-20.089285714285712"/>
         </scene>
     </scenes>
+    <resources>
+        <systemColor name="labelColor">
+            <color white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+        </systemColor>
+        <systemColor name="systemBackgroundColor">
+            <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+        </systemColor>
+    </resources>
 </document>

+ 3 - 8
iOSClient/Security/NCViewCertificateDetails.swift

@@ -36,7 +36,8 @@ class NCViewCertificateDetails: UIViewController  {
 
     @IBOutlet weak var buttonCancel: UIBarButtonItem!
     @IBOutlet weak var scrollView: UIScrollView!
-    
+    @IBOutlet weak var textView: UITextView!
+
     public var delegate: NCViewCertificateDetailsDelegate?
 
     // MARK: - View Life Cycle
@@ -65,17 +66,11 @@ class NCViewCertificateDetails: UIViewController  {
                 if contentHeight < view.frame.size.height {
                     contentHeight = view.frame.size.width
                 }
-                let textViewFrame = CGRect(x: 0, y: 0, width: contentWidth, height: contentHeight)
                 
-                let textView = UITextView.init(frame: textViewFrame)
-                textView.translatesAutoresizingMaskIntoConstraints = false
-                textView.isEditable = false
-                textView.isScrollEnabled = true
+                textView.frame = CGRect(x: 0, y: 0, width: contentWidth, height: contentHeight)
                 textView.font = font
                 textView.text = text
-                textView.sizeToFit()
                 
-                scrollView.addSubview(textView)
                 scrollView.contentSize = contentRect.size
                 scrollView.contentInset = UIEdgeInsets(top: 0, left: 0, bottom: 50, right: 0)