pre-comit
authorXavier Algarra <xavier@pep-project.org>
Mon, 24 Apr 2017 13:36:00 +0200
changeset 2133dfe6ac9012ec
parent 2132 4289912d9366
child 2134 d42f50ad8e69
pre-comit
pEpForiOS.xcodeproj/project.pbxproj
pEpForiOS/Base.lproj/AccountCreation.storyboard
pEpForiOS/Base.lproj/Main.storyboard
pEpForiOS/Settings.storyboard
pEpForiOS/UI/AccountsAndFolders/AccountsTableViewController.swift
pEpForiOS/UI/AccountsAndFolders/LoginViewController.swift
pEpForiOS/UI/FolderViews.storyboard
pEpForiOS/UI/Util/UIButton+Extension.swift
pEpForiOS/UI/Util/UIColor+Extension.swift
pEpForiOS/UI/Util/UITextField+Extension.swift
pEpForiOS/UI/Util/UIView+Util.swift
     1.1 --- a/pEpForiOS.xcodeproj/project.pbxproj	Mon Apr 24 13:35:36 2017 +0200
     1.2 +++ b/pEpForiOS.xcodeproj/project.pbxproj	Mon Apr 24 13:36:00 2017 +0200
     1.3 @@ -207,10 +207,12 @@
     1.4  		B722EC651E5B49BA00A2B9D5 /* FolderSectionViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = B722EC641E5B49BA00A2B9D5 /* FolderSectionViewModel.swift */; };
     1.5  		B722EC7A1E5C879000A2B9D5 /* FolderUiProtocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = B722EC791E5C879000A2B9D5 /* FolderUiProtocols.swift */; };
     1.6  		B729BEC61E7C35E200793110 /* FilterUpdateProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = B729BEC51E7C35E200793110 /* FilterUpdateProtocol.swift */; };
     1.7 +		B7365CDE1EAF45F30036ECC7 /* UITextField+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = B7365CDD1EAF45F30036ECC7 /* UITextField+Extension.swift */; };
     1.8  		B740B75D1E4B1C2D002585E1 /* jsonMimeType.txt in Resources */ = {isa = PBXBuildFile; fileRef = B740B75C1E4B1C2D002585E1 /* jsonMimeType.txt */; };
     1.9  		B740B75F1E4B1C46002585E1 /* MimeTypeUtil.swift in Sources */ = {isa = PBXBuildFile; fileRef = B740B75E1E4B1C46002585E1 /* MimeTypeUtil.swift */; };
    1.10  		B78309C81EAA09040051A2E0 /* AccountCreation.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B78309C61EAA09040051A2E0 /* AccountCreation.storyboard */; };
    1.11  		B78309CA1EAA0AC90051A2E0 /* Settings.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B78309C91EAA0AC90051A2E0 /* Settings.storyboard */; };
    1.12 +		B78309CC1EAA59290051A2E0 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B78309CB1EAA59290051A2E0 /* LoginViewController.swift */; };
    1.13  		B783C1521E82BBE20093128C /* FolderViews.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B783C1511E82BBE20093128C /* FolderViews.storyboard */; };
    1.14  		B78CF8251E76D706008C1739 /* FilterTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B78CF8241E76D706008C1739 /* FilterTableViewController.swift */; };
    1.15  		B78CF8291E76E0F1008C1739 /* FilterViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = B78CF8281E76E0F1008C1739 /* FilterViewModel.swift */; };
    1.16 @@ -460,10 +462,12 @@
    1.17  		B722EC641E5B49BA00A2B9D5 /* FolderSectionViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = FolderSectionViewModel.swift; path = Folder/ViewModel/FolderSectionViewModel.swift; sourceTree = "<group>"; };
    1.18  		B722EC791E5C879000A2B9D5 /* FolderUiProtocols.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FolderUiProtocols.swift; sourceTree = "<group>"; };
    1.19  		B729BEC51E7C35E200793110 /* FilterUpdateProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = FilterUpdateProtocol.swift; path = Filter/ViewModel/FilterUpdateProtocol.swift; sourceTree = "<group>"; };
    1.20 +		B7365CDD1EAF45F30036ECC7 /* UITextField+Extension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UITextField+Extension.swift"; sourceTree = "<group>"; };
    1.21  		B740B75C1E4B1C2D002585E1 /* jsonMimeType.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = jsonMimeType.txt; sourceTree = "<group>"; };
    1.22  		B740B75E1E4B1C46002585E1 /* MimeTypeUtil.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MimeTypeUtil.swift; sourceTree = "<group>"; };
    1.23  		B78309C71EAA09040051A2E0 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/AccountCreation.storyboard; sourceTree = "<group>"; };
    1.24  		B78309C91EAA0AC90051A2E0 /* Settings.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Settings.storyboard; sourceTree = "<group>"; };
    1.25 +		B78309CB1EAA59290051A2E0 /* LoginViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = "<group>"; };
    1.26  		B783C1511E82BBE20093128C /* FolderViews.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = FolderViews.storyboard; path = UI/FolderViews.storyboard; sourceTree = "<group>"; };
    1.27  		B78CF8241E76D706008C1739 /* FilterTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = FilterTableViewController.swift; path = Filter/FilterTableViewController.swift; sourceTree = "<group>"; };
    1.28  		B78CF8281E76E0F1008C1739 /* FilterViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = FilterViewModel.swift; path = Filter/ViewModel/FilterViewModel.swift; sourceTree = "<group>"; };
    1.29 @@ -640,6 +644,7 @@
    1.30  			children = (
    1.31  				431B0B991D6734DF0082D0DB /* AccountsTableViewController.swift */,
    1.32  				8B77BD681E0C1D930060F11F /* AccountSettingsTableViewController.swift */,
    1.33 +				B78309CB1EAA59290051A2E0 /* LoginViewController.swift */,
    1.34  			);
    1.35  			name = AccountsSettings;
    1.36  			path = AccountsAndFolders;
    1.37 @@ -862,6 +867,7 @@
    1.38  				43C322061EA8E7AD005073FB /* UIButton+Extension.swift */,
    1.39  				4362398B1EADD61B00BD2EB9 /* CGSize+Extension.swift */,
    1.40  				4362399E1EAE2F0A00BD2EB9 /* UITableView+Extension.swift */,
    1.41 +				B7365CDD1EAF45F30036ECC7 /* UITextField+Extension.swift */,
    1.42  			);
    1.43  			path = Util;
    1.44  			sourceTree = "<group>";
    1.45 @@ -1270,6 +1276,7 @@
    1.46  				436C232D1E02A2D900071430 /* KickOffMySelfProtocol.swift in Sources */,
    1.47  				43C322111EA91764005073FB /* UIImageView+Extension.swift in Sources */,
    1.48  				220DCE351E0AB5CC002FE716 /* MessageContentCell.swift in Sources */,
    1.49 +				B78309CC1EAA59290051A2E0 /* LoginViewController.swift in Sources */,
    1.50  				222B35561DF962D7007A1F82 /* ComposeHelpers.swift in Sources */,
    1.51  				220DCE361E0AB5CC002FE716 /* MessageSenderCell.swift in Sources */,
    1.52  				43122B181DF5B48B00610253 /* EmailConnectInfo.swift in Sources */,
    1.53 @@ -1379,6 +1386,7 @@
    1.54  				432142661E8FD6A400FBE987 /* ServiceUtil.swift in Sources */,
    1.55  				43C322051EA89EED005073FB /* HandshakePartnerTableViewCell.swift in Sources */,
    1.56  				43980EFA1CBD415700A7FC3C /* AppConfig.swift in Sources */,
    1.57 +				B7365CDE1EAF45F30036ECC7 /* UITextField+Extension.swift in Sources */,
    1.58  				43F9D99A1E92725700F78A1C /* AttachmentsViewHelper.swift in Sources */,
    1.59  				A1014DA71D1173CD00C472A8 /* UIHelper.swift in Sources */,
    1.60  				43A6E0581E57400E005BEE69 /* RatingReEvaluator.swift in Sources */,
     2.1 --- a/pEpForiOS/Base.lproj/AccountCreation.storyboard	Mon Apr 24 13:35:36 2017 +0200
     2.2 +++ b/pEpForiOS/Base.lproj/AccountCreation.storyboard	Mon Apr 24 13:36:00 2017 +0200
     2.3 @@ -1,5 +1,5 @@
     2.4  <?xml version="1.0" encoding="UTF-8"?>
     2.5 -<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12120" systemVersion="16E195" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="Efv-29-FEv">
     2.6 +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12120" systemVersion="16E195" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="Pmh-wt-r2j">
     2.7      <device id="retina4_7" orientation="portrait">
     2.8          <adaptation id="fullscreen"/>
     2.9      </device>
    2.10 @@ -544,13 +544,92 @@
    2.11              </objects>
    2.12              <point key="canvasLocation" x="7183.1999999999998" y="-395.35232383808096"/>
    2.13          </scene>
    2.14 +        <!--Login View Controller-->
    2.15 +        <scene sceneID="yNr-d4-uNq">
    2.16 +            <objects>
    2.17 +                <viewController storyboardIdentifier="login" id="q7B-Vn-elT" customClass="LoginViewController" customModule="pEpForiOS" customModuleProvider="target" sceneMemberID="viewController">
    2.18 +                    <layoutGuides>
    2.19 +                        <viewControllerLayoutGuide type="top" id="dip-fr-6Hk"/>
    2.20 +                        <viewControllerLayoutGuide type="bottom" id="JtW-8O-Ud1"/>
    2.21 +                    </layoutGuides>
    2.22 +                    <view key="view" contentMode="scaleToFill" id="Wh4-W5-ha9">
    2.23 +                        <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
    2.24 +                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
    2.25 +                        <subviews>
    2.26 +                            <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="center" adjustsFontForContentSizeCategory="YES" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="SBi-ih-ZhG">
    2.27 +                                <rect key="frame" x="36" y="318" width="303" height="30"/>
    2.28 +                                <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
    2.29 +                                <fontDescription key="fontDescription" type="system" pointSize="19"/>
    2.30 +                                <textInputTraits key="textInputTraits" secureTextEntry="YES"/>
    2.31 +                            </textField>
    2.32 +                            <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="center" adjustsFontForContentSizeCategory="YES" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="IhV-HS-dzI">
    2.33 +                                <rect key="frame" x="36" y="213" width="303" height="30"/>
    2.34 +                                <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
    2.35 +                                <fontDescription key="fontDescription" type="system" pointSize="19"/>
    2.36 +                                <textInputTraits key="textInputTraits" keyboardType="emailAddress"/>
    2.37 +                                <userDefinedRuntimeAttributes>
    2.38 +                                    <userDefinedRuntimeAttribute type="color" keyPath="_placeholderLabel.textColor">
    2.39 +                                        <color key="value" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
    2.40 +                                    </userDefinedRuntimeAttribute>
    2.41 +                                </userDefinedRuntimeAttributes>
    2.42 +                            </textField>
    2.43 +                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Nk5-Ai-Avh">
    2.44 +                                <rect key="frame" x="36" y="423" width="303" height="30"/>
    2.45 +                                <state key="normal" title="Button"/>
    2.46 +                                <connections>
    2.47 +                                    <action selector="login:" destination="q7B-Vn-elT" eventType="touchUpInside" id="s3e-6Y-l1P"/>
    2.48 +                                </connections>
    2.49 +                            </button>
    2.50 +                        </subviews>
    2.51 +                        <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
    2.52 +                        <constraints>
    2.53 +                            <constraint firstItem="SBi-ih-ZhG" firstAttribute="leading" secondItem="Wh4-W5-ha9" secondAttribute="leadingMargin" constant="20" id="03Q-L2-SkU"/>
    2.54 +                            <constraint firstAttribute="trailingMargin" secondItem="IhV-HS-dzI" secondAttribute="trailing" constant="20" id="DDw-gt-Zuj"/>
    2.55 +                            <constraint firstItem="IhV-HS-dzI" firstAttribute="leading" secondItem="Wh4-W5-ha9" secondAttribute="leadingMargin" constant="20" id="DxC-DX-Uyg"/>
    2.56 +                            <constraint firstItem="SBi-ih-ZhG" firstAttribute="top" secondItem="IhV-HS-dzI" secondAttribute="bottom" constant="75" id="JAd-h3-JdL"/>
    2.57 +                            <constraint firstItem="Nk5-Ai-Avh" firstAttribute="leading" secondItem="Wh4-W5-ha9" secondAttribute="leadingMargin" constant="20" id="ZCp-od-kwv"/>
    2.58 +                            <constraint firstAttribute="trailingMargin" secondItem="SBi-ih-ZhG" secondAttribute="trailing" constant="20" id="coU-S6-Eu0"/>
    2.59 +                            <constraint firstItem="Nk5-Ai-Avh" firstAttribute="top" secondItem="SBi-ih-ZhG" secondAttribute="bottom" constant="75" id="mzR-ld-CwU"/>
    2.60 +                            <constraint firstAttribute="trailingMargin" secondItem="Nk5-Ai-Avh" secondAttribute="trailing" constant="20" id="qcr-QI-9mx"/>
    2.61 +                            <constraint firstItem="SBi-ih-ZhG" firstAttribute="centerY" secondItem="Wh4-W5-ha9" secondAttribute="centerY" id="rY6-D9-fFO"/>
    2.62 +                        </constraints>
    2.63 +                    </view>
    2.64 +                    <navigationItem key="navigationItem" id="pFO-TV-vvj"/>
    2.65 +                    <connections>
    2.66 +                        <outlet property="emailAddress" destination="IhV-HS-dzI" id="8bU-6L-LcY"/>
    2.67 +                        <outlet property="loginButton" destination="Nk5-Ai-Avh" id="OWd-bJ-hhh"/>
    2.68 +                        <outlet property="password" destination="SBi-ih-ZhG" id="7Zq-hf-ZTF"/>
    2.69 +                    </connections>
    2.70 +                </viewController>
    2.71 +                <placeholder placeholderIdentifier="IBFirstResponder" id="F8v-X1-RNK" userLabel="First Responder" sceneMemberID="firstResponder"/>
    2.72 +            </objects>
    2.73 +            <point key="canvasLocation" x="8120.8000000000002" y="377.36131934032989"/>
    2.74 +        </scene>
    2.75          <!--Main-->
    2.76          <scene sceneID="Ib2-kl-E5M">
    2.77              <objects>
    2.78                  <viewControllerPlaceholder storyboardName="Main" id="6yd-9e-jF0" sceneMemberID="viewController"/>
    2.79                  <placeholder placeholderIdentifier="IBFirstResponder" id="3c0-E0-VNt" userLabel="First Responder" sceneMemberID="firstResponder"/>
    2.80              </objects>
    2.81 -            <point key="canvasLocation" x="9512" y="91"/>
    2.82 +            <point key="canvasLocation" x="10450.4" y="90.854572713643179"/>
    2.83 +        </scene>
    2.84 +        <!--Navigation Controller-->
    2.85 +        <scene sceneID="k0J-2n-txl">
    2.86 +            <objects>
    2.87 +                <navigationController automaticallyAdjustsScrollViewInsets="NO" id="Pmh-wt-r2j" sceneMemberID="viewController">
    2.88 +                    <toolbarItems/>
    2.89 +                    <navigationBar key="navigationBar" contentMode="scaleToFill" id="oRt-LR-ehC">
    2.90 +                        <rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
    2.91 +                        <autoresizingMask key="autoresizingMask"/>
    2.92 +                    </navigationBar>
    2.93 +                    <nil name="viewControllers"/>
    2.94 +                    <connections>
    2.95 +                        <segue destination="q7B-Vn-elT" kind="relationship" relationship="rootViewController" id="Bpt-ks-jqe"/>
    2.96 +                    </connections>
    2.97 +                </navigationController>
    2.98 +                <placeholder placeholderIdentifier="IBFirstResponder" id="ccO-L8-L8U" userLabel="First Responder" sceneMemberID="firstResponder"/>
    2.99 +            </objects>
   2.100 +            <point key="canvasLocation" x="7181.6000000000004" y="377.36131934032989"/>
   2.101          </scene>
   2.102      </scenes>
   2.103  </document>
     3.1 --- a/pEpForiOS/Base.lproj/Main.storyboard	Mon Apr 24 13:35:36 2017 +0200
     3.2 +++ b/pEpForiOS/Base.lproj/Main.storyboard	Mon Apr 24 13:36:00 2017 +0200
     3.3 @@ -1016,6 +1016,6 @@
     3.4          <image name="unread-icon" width="22" height="22"/>
     3.5      </resources>
     3.6      <inferredMetricsTieBreakers>
     3.7 -        <segue reference="Usl-iS-7fo"/>
     3.8 +        <segue reference="xmi-xn-p8T"/>
     3.9      </inferredMetricsTieBreakers>
    3.10  </document>
     4.1 --- a/pEpForiOS/Settings.storyboard	Mon Apr 24 13:35:36 2017 +0200
     4.2 +++ b/pEpForiOS/Settings.storyboard	Mon Apr 24 13:36:00 2017 +0200
     4.3 @@ -115,6 +115,7 @@
     4.4                      <connections>
     4.5                          <segue destination="Eri-pJ-T3J" kind="show" identifier="segueEditAccount" id="WKY-VX-I5i"/>
     4.6                          <segue destination="01V-rr-Nt1" kind="show" identifier="segueShowLog" id="uAI-I4-HaK"/>
     4.7 +                        <segue destination="oeK-xs-7Ae" kind="show" id="c3k-5n-9Tw"/>
     4.8                      </connections>
     4.9                  </tableViewController>
    4.10                  <placeholder placeholderIdentifier="IBFirstResponder" id="BPe-Zm-lKR" userLabel="First Responder" sceneMemberID="firstResponder"/>
    4.11 @@ -506,5 +507,13 @@
    4.12              </objects>
    4.13              <point key="canvasLocation" x="4966" y="-377"/>
    4.14          </scene>
    4.15 +        <!--AccountCreation-->
    4.16 +        <scene sceneID="t1R-eh-AAS">
    4.17 +            <objects>
    4.18 +                <viewControllerPlaceholder storyboardName="AccountCreation" id="oeK-xs-7Ae" sceneMemberID="viewController"/>
    4.19 +                <placeholder placeholderIdentifier="IBFirstResponder" id="oQ0-VR-JUv" userLabel="First Responder" sceneMemberID="firstResponder"/>
    4.20 +            </objects>
    4.21 +            <point key="canvasLocation" x="4990" y="-66"/>
    4.22 +        </scene>
    4.23      </scenes>
    4.24  </document>
     5.1 --- a/pEpForiOS/UI/AccountsAndFolders/AccountsTableViewController.swift	Mon Apr 24 13:35:36 2017 +0200
     5.2 +++ b/pEpForiOS/UI/AccountsAndFolders/AccountsTableViewController.swift	Mon Apr 24 13:36:00 2017 +0200
     5.3 @@ -78,7 +78,7 @@
     5.4          case 0:
     5.5              return accounts.count
     5.6          case 1:
     5.7 -            return 1
     5.8 +            return 2
     5.9          default:
    5.10              return 0
    5.11          }
    5.12 @@ -110,6 +110,13 @@
    5.13              return cell
    5.14  
    5.15          } else if indexPath.section == 1 {
    5.16 +            if indexPath.row == 1{
    5.17 +                let cell = tableView.dequeueReusableCell(withIdentifier: accountsCellIdentifier, for: indexPath)
    5.18 +                cell.textLabel?.text = "New Login".localized
    5.19 +                cell.accessoryType = .disclosureIndicator
    5.20 +                cell.textLabel?.numberOfLines = 0
    5.21 +                return cell
    5.22 +            }
    5.23  
    5.24              let cell = tableView.dequeueReusableCell(withIdentifier: accountsCellIdentifier, for: indexPath)
    5.25              cell.textLabel?.text = "Logging".localized
    5.26 @@ -130,7 +137,11 @@
    5.27      override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
    5.28  
    5.29          if indexPath.section == 1 {
    5.30 -            performSegue(withIdentifier: .segueShowLog, sender: self)
    5.31 +            if indexPath.row == 1 {
    5.32 +
    5.33 +            } else {
    5.34 +                performSegue(withIdentifier: .segueShowLog, sender: self)
    5.35 +            }
    5.36          } else {
    5.37              selectedAccount = accounts[indexPath.row]
    5.38              performSegue(withIdentifier: .segueEditAccount, sender: self)
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/pEpForiOS/UI/AccountsAndFolders/LoginViewController.swift	Mon Apr 24 13:36:00 2017 +0200
     6.3 @@ -0,0 +1,45 @@
     6.4 +//
     6.5 +//  LoginViewController.swift
     6.6 +//  pEpForiOS
     6.7 +//
     6.8 +//  Created by Xavier Algarra on 21/04/2017.
     6.9 +//  Copyright © 2017 p≡p Security S.A. All rights reserved.
    6.10 +//
    6.11 +
    6.12 +import UIKit
    6.13 +
    6.14 +class LoginViewController: UIViewController {
    6.15 +
    6.16 +
    6.17 +    @IBOutlet weak var emailAddress: UITextField!
    6.18 +    @IBOutlet weak var password: UITextField!
    6.19 +
    6.20 +    @IBOutlet weak var loginButton: UIButton!
    6.21 +
    6.22 +    override func viewDidLoad() {
    6.23 +        super.viewDidLoad()
    6.24 +
    6.25 +        configureView()
    6.26 +        // Do any additional setup after loading the view.
    6.27 +
    6.28 +    }
    6.29 +
    6.30 +    func configureView() {
    6.31 +        self.view.applyGradient(colours: [UIColor.pEpGreen, UIColor.pEpDarkGreen])
    6.32 +        self.emailAddress.convertToLoginTextField(placeHolder: NSLocalizedString("Email", comment: "Email"))
    6.33 +        self.password.convertToLoginTextField(placeHolder: NSLocalizedString("Password", comment: "password"))
    6.34 +        self.loginButton.convertToLoginButton(placeHolder: NSLocalizedString("Sign In", comment: "Login"))
    6.35 +
    6.36 +    }
    6.37 +
    6.38 +    override func didReceiveMemoryWarning() {
    6.39 +        super.didReceiveMemoryWarning()
    6.40 +        // Dispose of any resources that can be recreated.
    6.41 +    }
    6.42 +
    6.43 +    @IBAction func login(_ sender: Any) {
    6.44 +
    6.45 +    }
    6.46 +
    6.47 +
    6.48 +}
     7.1 --- a/pEpForiOS/UI/FolderViews.storyboard	Mon Apr 24 13:35:36 2017 +0200
     7.2 +++ b/pEpForiOS/UI/FolderViews.storyboard	Mon Apr 24 13:36:00 2017 +0200
     7.3 @@ -57,7 +57,7 @@
     7.4                                  <rect key="frame" x="0.0" y="28" width="375" height="44"/>
     7.5                                  <autoresizingMask key="autoresizingMask"/>
     7.6                                  <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Gav-RT-MrD" id="GDF-rs-ueo">
     7.7 -                                    <rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
     7.8 +                                    <rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
     7.9                                      <autoresizingMask key="autoresizingMask"/>
    7.10                                  </tableViewCellContentView>
    7.11                              </tableViewCell>
    7.12 @@ -83,10 +83,10 @@
    7.13              </objects>
    7.14              <point key="canvasLocation" x="9633" y="-1187"/>
    7.15          </scene>
    7.16 -        <!--AccountCreation-->
    7.17 +        <!--UINavigationController-Efv-29-FEv-->
    7.18          <scene sceneID="rdR-gU-SsC">
    7.19              <objects>
    7.20 -                <viewControllerPlaceholder storyboardName="AccountCreation" id="uKb-Ku-Cng" sceneMemberID="viewController"/>
    7.21 +                <viewControllerPlaceholder storyboardName="AccountCreation" referencedIdentifier="UINavigationController-Efv-29-FEv" id="uKb-Ku-Cng" sceneMemberID="viewController"/>
    7.22                  <placeholder placeholderIdentifier="IBFirstResponder" id="7bq-Lz-J44" userLabel="First Responder" sceneMemberID="firstResponder"/>
    7.23              </objects>
    7.24              <point key="canvasLocation" x="9674" y="-1142"/>
     8.1 --- a/pEpForiOS/UI/Util/UIButton+Extension.swift	Mon Apr 24 13:35:36 2017 +0200
     8.2 +++ b/pEpForiOS/UI/Util/UIButton+Extension.swift	Mon Apr 24 13:36:00 2017 +0200
     8.3 @@ -17,4 +17,12 @@
     8.4          self.backgroundColor = backgroundColor
     8.5          setTitleColor(textColor, for: .normal)
     8.6      }
     8.7 +
     8.8 +    func convertToLoginButton(placeHolder: String) {
     8.9 +        self.backgroundColor = UIColor.clear
    8.10 +        self.tintColor = UIColor.white
    8.11 +        self.layer.borderColor = UIColor.white.cgColor
    8.12 +        self.layer.borderWidth = 1.0
    8.13 +        self.setTitle(placeHolder, for: .normal)
    8.14 +    }
    8.15  }
     9.1 --- a/pEpForiOS/UI/Util/UIColor+Extension.swift	Mon Apr 24 13:35:36 2017 +0200
     9.2 +++ b/pEpForiOS/UI/Util/UIColor+Extension.swift	Mon Apr 24 13:36:00 2017 +0200
     9.3 @@ -15,6 +15,12 @@
     9.4          }
     9.5      }
     9.6  
     9.7 +    open class var pEpDarkGreen: UIColor {
     9.8 +        get {
     9.9 +            return UIColor(hex: "#1AAA50")
    9.10 +        }
    9.11 +    }
    9.12 +
    9.13      open class var pEpRed: UIColor {
    9.14          get {
    9.15              return UIColor(hex: "#FF3B30")
    10.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    10.2 +++ b/pEpForiOS/UI/Util/UITextField+Extension.swift	Mon Apr 24 13:36:00 2017 +0200
    10.3 @@ -0,0 +1,19 @@
    10.4 +//
    10.5 +//  UITextField+Extension.swift
    10.6 +//  pEpForiOS
    10.7 +//
    10.8 +//  Created by Xavier Algarra on 25/04/2017.
    10.9 +//  Copyright © 2017 p≡p Security S.A. All rights reserved.
   10.10 +//
   10.11 +
   10.12 +import UIKit
   10.13 +
   10.14 +extension UITextField {
   10.15 +    func convertToLoginTextField(placeHolder: String) {
   10.16 +        self.backgroundColor = UIColor.clear
   10.17 +        self.tintColor = UIColor.white
   10.18 +        self.layer.borderColor = UIColor.white.cgColor
   10.19 +        self.layer.borderWidth = 1.0
   10.20 +        self.attributedPlaceholder = NSAttributedString(string:placeHolder, attributes: [NSForegroundColorAttributeName: UIColor.white])
   10.21 +    }
   10.22 +}
    11.1 --- a/pEpForiOS/UI/Util/UIView+Util.swift	Mon Apr 24 13:35:36 2017 +0200
    11.2 +++ b/pEpForiOS/UI/Util/UIView+Util.swift	Mon Apr 24 13:36:00 2017 +0200
    11.3 @@ -58,4 +58,16 @@
    11.4              v.removeFromSuperview()
    11.5          }
    11.6      }
    11.7 +
    11.8 +    func applyGradient(colours: [UIColor]) -> Void {
    11.9 +        self.applyGradient(colours: colours, locations: nil)
   11.10 +    }
   11.11 +
   11.12 +    func applyGradient(colours: [UIColor], locations: [NSNumber]?) -> Void {
   11.13 +        let gradient: CAGradientLayer = CAGradientLayer()
   11.14 +        gradient.frame = self.bounds
   11.15 +        gradient.colors = colours.map { $0.cgColor }
   11.16 +        gradient.locations = locations
   11.17 +        self.layer.insertSublayer(gradient, at: 0)
   11.18 +    }
   11.19  }