diff options
| author | Andrej Mihajlov <and@mullvad.net> | 2020-09-03 13:59:22 +0200 |
|---|---|---|
| committer | Andrej Mihajlov <and@mullvad.net> | 2020-09-03 19:45:32 +0200 |
| commit | 2d23d9995f461ff616efb0e96e5f059173cdaa37 (patch) | |
| tree | 57495bc9902569d9d8964f1444df223f11b57089 /ios | |
| parent | 902cd3adc38b0fa3783624454fa0cf26d1c2fb03 (diff) | |
| download | mullvadvpn-2d23d9995f461ff616efb0e96e5f059173cdaa37.tar.xz mullvadvpn-2d23d9995f461ff616efb0e96e5f059173cdaa37.zip | |
Move ConnectViewController to XIB
Diffstat (limited to 'ios')
| -rw-r--r-- | ios/MullvadVPN.xcodeproj/project.pbxproj | 4 | ||||
| -rw-r--r-- | ios/MullvadVPN/AppDelegate.swift | 12 | ||||
| -rw-r--r-- | ios/MullvadVPN/Base.lproj/Main.storyboard | 130 | ||||
| -rw-r--r-- | ios/MullvadVPN/ConnectViewController.xib | 116 | ||||
| -rw-r--r-- | ios/MullvadVPN/ViewControllerIdentifier.swift | 1 |
5 files changed, 138 insertions, 125 deletions
diff --git a/ios/MullvadVPN.xcodeproj/project.pbxproj b/ios/MullvadVPN.xcodeproj/project.pbxproj index 3961219d16..a6fea6eb98 100644 --- a/ios/MullvadVPN.xcodeproj/project.pbxproj +++ b/ios/MullvadVPN.xcodeproj/project.pbxproj @@ -187,6 +187,7 @@ 58CE5E81224146470008646E /* PacketTunnel.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 58CE5E79224146470008646E /* PacketTunnel.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 58D0C79E23F1CEBA00FE9BA7 /* SnapshotHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58D0C79D23F1CEBA00FE9BA7 /* SnapshotHelper.swift */; }; 58D0C7A223F1CECF00FE9BA7 /* MullvadVPNScreenshots.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58D0C7A023F1CECF00FE9BA7 /* MullvadVPNScreenshots.swift */; }; + 58D9AF6B2501111800B6FAB5 /* ConnectViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 58D9AF6A2501111800B6FAB5 /* ConnectViewController.xib */; }; 58DF28A52417CB4B00E836B0 /* AppStorePaymentManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58DF28A42417CB4B00E836B0 /* AppStorePaymentManager.swift */; }; 58E5BC2624FEB6DB00A53A76 /* AccountViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 58E5BC2524FEB6DB00A53A76 /* AccountViewController.xib */; }; 58E6771F24ADFE7800AA26E7 /* SettingsNavigationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58E6771E24ADFE7800AA26E7 /* SettingsNavigationController.swift */; }; @@ -379,6 +380,7 @@ 58D0C79D23F1CEBA00FE9BA7 /* SnapshotHelper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SnapshotHelper.swift; sourceTree = "<group>"; }; 58D0C79F23F1CECF00FE9BA7 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; 58D0C7A023F1CECF00FE9BA7 /* MullvadVPNScreenshots.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MullvadVPNScreenshots.swift; sourceTree = "<group>"; }; + 58D9AF6A2501111800B6FAB5 /* ConnectViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ConnectViewController.xib; sourceTree = "<group>"; }; 58DF28A42417CB4B00E836B0 /* AppStorePaymentManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppStorePaymentManager.swift; sourceTree = "<group>"; }; 58E5BC2524FEB6DB00A53A76 /* AccountViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = AccountViewController.xib; sourceTree = "<group>"; }; 58E6771E24ADFE7800AA26E7 /* SettingsNavigationController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsNavigationController.swift; sourceTree = "<group>"; }; @@ -625,6 +627,7 @@ 58F3C098249B978C003E76BE /* x25519.c */, 58F3C097249B978C003E76BE /* x25519.h */, 58AB9DED25010636006C5526 /* LoginViewController.xib */, + 58D9AF6A2501111800B6FAB5 /* ConnectViewController.xib */, ); path = MullvadVPN; sourceTree = "<group>"; @@ -854,6 +857,7 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 58D9AF6B2501111800B6FAB5 /* ConnectViewController.xib in Resources */, 58AB9DEE25010636006C5526 /* LoginViewController.xib in Resources */, 58F3C0A624A50157003E76BE /* relays.json in Resources */, 58CE5E6E224146210008646E /* LaunchScreen.storyboard in Resources */, diff --git a/ios/MullvadVPN/AppDelegate.swift b/ios/MullvadVPN/AppDelegate.swift index c6045f0766..4db1ade720 100644 --- a/ios/MullvadVPN/AppDelegate.swift +++ b/ios/MullvadVPN/AppDelegate.swift @@ -54,7 +54,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { rootViewController.delegate = self let showMainController = { (_ animated: Bool) in - self.showMainController(in: rootViewController, animated: animated) { + self.showConnectController(in: rootViewController, animated: animated) { self.didPresentTheMainController() } } @@ -96,7 +96,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { rootViewController.setViewControllers([consentViewController], animated: false) } - private func showMainController( + private func showConnectController( in rootViewController: RootContainerViewController, animated: Bool, completionHandler: @escaping () -> Void) @@ -107,9 +107,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { var viewControllers: [UIViewController] = [loginViewController] if Account.shared.isLoggedIn { - let mainViewController = self.mainStoryboard.instantiateViewController(withIdentifier: ViewControllerIdentifier.main.rawValue) - - viewControllers.append(mainViewController) + viewControllers.append(ConnectViewController()) } rootViewController.setViewControllers(viewControllers, animated: animated, completion: completionHandler) @@ -138,9 +136,7 @@ extension AppDelegate: RootContainerViewControllerDelegate { extension AppDelegate: LoginViewControllerDelegate { func loginViewControllerDidLogin(_ controller: LoginViewController) { - let mainViewController = self.mainStoryboard.instantiateViewController(withIdentifier: ViewControllerIdentifier.main.rawValue) - - rootContainer?.pushViewController(mainViewController, animated: true) + rootContainer?.pushViewController(ConnectViewController(), animated: true) } } diff --git a/ios/MullvadVPN/Base.lproj/Main.storyboard b/ios/MullvadVPN/Base.lproj/Main.storyboard index 159bc2b48c..7f4ea612e6 100644 --- a/ios/MullvadVPN/Base.lproj/Main.storyboard +++ b/ios/MullvadVPN/Base.lproj/Main.storyboard @@ -24,105 +24,6 @@ </objects> <point key="canvasLocation" x="670" y="-57"/> </scene> - <!--Connect View Controller--> - <scene sceneID="Fnf-X9-B7i"> - <objects> - <viewController storyboardIdentifier="Main" id="Ki6-Mt-b6R" customClass="ConnectViewController" customModule="MullvadVPN" customModuleProvider="target" sceneMemberID="viewController"> - <view key="view" contentMode="scaleToFill" id="PNd-mm-N1B"> - <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> - <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> - <subviews> - <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="8" translatesAutoresizingMaskIntoConstraints="NO" id="3rI-k6-N1S"> - <rect key="frame" x="24" y="307" width="327" height="212"/> - <subviews> - <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="SECURE CONNECTION" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="HNy-mU-nui"> - <rect key="frame" x="0.0" y="0.0" width="327" height="24"/> - <accessibility key="accessibilityConfiguration" identifier="SecureConnectionLabel"/> - <fontDescription key="fontDescription" type="boldSystem" pointSize="20"/> - <color key="textColor" name="Success"/> - <nil key="highlightedColor"/> - </label> - <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="PBy-k6-ijS"> - <rect key="frame" x="0.0" y="32" width="327" height="82"/> - <subviews> - <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Stockholm" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="mfr-Ic-PYf"> - <rect key="frame" x="0.0" y="0.0" width="327" height="41"/> - <fontDescription key="fontDescription" type="boldSystem" pointSize="34"/> - <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> - <nil key="highlightedColor"/> - </label> - <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Sweden" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsLetterSpacingToFitWidth="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9Yf-sl-l3q"> - <rect key="frame" x="0.0" y="41" width="327" height="41"/> - <fontDescription key="fontDescription" type="boldSystem" pointSize="34"/> - <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> - <nil key="highlightedColor"/> - </label> - </subviews> - </stackView> - <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="hCl-ph-fhs"> - <rect key="frame" x="0.0" y="122" width="327" height="90"/> - <subviews> - <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ocV-9f-WDZ" customClass="ConnectionPanelView" customModule="MullvadVPN" customModuleProvider="target"> - <rect key="frame" x="0.0" y="0.0" width="327" height="90"/> - <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> - <constraints> - <constraint firstAttribute="height" constant="90" placeholder="YES" id="z9Q-OD-1co"/> - </constraints> - </view> - </subviews> - <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> - <constraints> - <constraint firstItem="ocV-9f-WDZ" firstAttribute="top" secondItem="hCl-ph-fhs" secondAttribute="top" id="S3C-dT-RKK"/> - <constraint firstItem="ocV-9f-WDZ" firstAttribute="leading" secondItem="hCl-ph-fhs" secondAttribute="leading" id="e8V-PF-ISy"/> - <constraint firstAttribute="bottom" secondItem="ocV-9f-WDZ" secondAttribute="bottom" id="ehS-MG-cf7"/> - <constraint firstAttribute="trailing" secondItem="ocV-9f-WDZ" secondAttribute="trailing" id="jIg-r7-5mz"/> - </constraints> - </view> - </subviews> - </stackView> - <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="kbg-vd-uS0"> - <rect key="frame" x="24" y="543" width="327" height="100"/> - <subviews> - <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="fillEqually" spacing="16" translatesAutoresizingMaskIntoConstraints="NO" id="oZQ-uX-qg5"> - <rect key="frame" x="0.0" y="0.0" width="327" height="100"/> - <constraints> - <constraint firstAttribute="height" constant="100" placeholder="YES" id="xyU-Ve-38D"/> - </constraints> - </stackView> - </subviews> - <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> - <constraints> - <constraint firstItem="oZQ-uX-qg5" firstAttribute="leading" secondItem="kbg-vd-uS0" secondAttribute="leading" id="CVK-s8-K47"/> - <constraint firstAttribute="trailing" secondItem="oZQ-uX-qg5" secondAttribute="trailing" id="IEd-jf-HBD"/> - <constraint firstAttribute="bottom" secondItem="oZQ-uX-qg5" secondAttribute="bottom" id="pAj-Dl-cfL"/> - <constraint firstItem="oZQ-uX-qg5" firstAttribute="top" secondItem="kbg-vd-uS0" secondAttribute="top" id="qfE-M4-Vqw"/> - </constraints> - </view> - </subviews> - <color key="backgroundColor" name="Primary"/> - <constraints> - <constraint firstItem="3rI-k6-N1S" firstAttribute="leading" secondItem="PNd-mm-N1B" secondAttribute="leadingMargin" id="5fs-z1-QKf"/> - <constraint firstAttribute="trailingMargin" secondItem="3rI-k6-N1S" secondAttribute="trailing" id="NFr-rI-7r3"/> - <constraint firstItem="iBo-pG-OTz" firstAttribute="bottom" secondItem="kbg-vd-uS0" secondAttribute="bottom" constant="24" id="Und-F7-4LQ"/> - <constraint firstItem="kbg-vd-uS0" firstAttribute="leading" secondItem="iBo-pG-OTz" secondAttribute="leading" constant="24" id="WON-cN-WSC"/> - <constraint firstItem="kbg-vd-uS0" firstAttribute="top" secondItem="3rI-k6-N1S" secondAttribute="bottom" constant="24" id="Yrd-dM-tsp"/> - <constraint firstItem="iBo-pG-OTz" firstAttribute="trailing" secondItem="kbg-vd-uS0" secondAttribute="trailing" constant="24" id="cbX-QT-hOe"/> - </constraints> - <edgeInsets key="layoutMargins" top="0.0" left="24" bottom="24" right="24"/> - <viewLayoutGuide key="safeArea" id="iBo-pG-OTz"/> - </view> - <connections> - <outlet property="buttonsStackView" destination="oZQ-uX-qg5" id="dvm-AG-6HG"/> - <outlet property="cityLabel" destination="mfr-Ic-PYf" id="vut-Me-cdj"/> - <outlet property="connectionPanel" destination="ocV-9f-WDZ" id="Uad-bl-KFU"/> - <outlet property="countryLabel" destination="9Yf-sl-l3q" id="L3N-Jn-zlr"/> - <outlet property="secureLabel" destination="HNy-mU-nui" id="QBg-mR-Z6g"/> - </connections> - </viewController> - <placeholder placeholderIdentifier="IBFirstResponder" id="gkg-dm-hcG" userLabel="First Responder" sceneMemberID="firstResponder"/> - </objects> - <point key="canvasLocation" x="1689" y="-57"/> - </scene> <!--Settings--> <scene sceneID="3oF-uu-3Bk"> <objects> @@ -135,20 +36,20 @@ <color key="separatorColor" name="Secondary"/> <prototypes> <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" reuseIdentifier="Account" id="ghE-jC-RWf" customClass="SettingsAccountCell" customModule="MullvadVPN" customModuleProvider="target"> - <rect key="frame" x="0.0" y="55.5" width="375" height="43.5"/> + <rect key="frame" x="0.0" y="55.5" width="375" height="43"/> <autoresizingMask key="autoresizingMask"/> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="ghE-jC-RWf" id="sTl-gI-g2a"> - <rect key="frame" x="0.0" y="0.0" width="348" height="43.5"/> + <rect key="frame" x="0.0" y="0.0" width="348" height="43"/> <autoresizingMask key="autoresizingMask"/> <subviews> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Account" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Lve-Kd-qTr"> - <rect key="frame" x="16" y="11" width="63.5" height="21.5"/> + <rect key="frame" x="16" y="11" width="63.5" height="21"/> <fontDescription key="fontDescription" type="system" pointSize="17"/> <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <nil key="highlightedColor"/> </label> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="252" verticalHuggingPriority="251" text="A YEAR LEFT" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="QeD-EQ-Ruo"> - <rect key="frame" x="259" y="11" width="81" height="21.5"/> + <rect key="frame" x="259" y="11" width="81" height="21"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="13"/> <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <nil key="highlightedColor"/> @@ -172,20 +73,20 @@ </connections> </tableViewCell> <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="AppVersion" id="pbd-iC-Emm" customClass="SettingsAppVersionCell" customModule="MullvadVPN" customModuleProvider="target"> - <rect key="frame" x="0.0" y="99" width="375" height="43.5"/> + <rect key="frame" x="0.0" y="98.5" width="375" height="43"/> <autoresizingMask key="autoresizingMask"/> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="pbd-iC-Emm" id="lYp-Z8-1sN"> - <rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/> + <rect key="frame" x="0.0" y="0.0" width="375" height="43"/> <autoresizingMask key="autoresizingMask"/> <subviews> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="App version" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="pYC-Zb-8N9"> - <rect key="frame" x="16" y="11" width="91" height="21.5"/> + <rect key="frame" x="16" y="11" width="91" height="21"/> <fontDescription key="fontDescription" type="system" pointSize="17"/> <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <nil key="highlightedColor"/> </label> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="252" verticalHuggingPriority="251" text="2018.3" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="sOr-vj-cg7"> - <rect key="frame" x="316.5" y="11" width="42.5" height="21.5"/> + <rect key="frame" x="316.5" y="11" width="42.5" height="21"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="13"/> <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <nil key="highlightedColor"/> @@ -207,14 +108,14 @@ </connections> </tableViewCell> <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" reuseIdentifier="BasicDisclosure" id="Ahs-gu-nTM" customClass="SettingsBasicCell" customModule="MullvadVPN" customModuleProvider="target"> - <rect key="frame" x="0.0" y="142.5" width="375" height="43.5"/> + <rect key="frame" x="0.0" y="141.5" width="375" height="43"/> <autoresizingMask key="autoresizingMask"/> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="Ahs-gu-nTM" id="Drq-vk-8F2"> - <rect key="frame" x="0.0" y="0.0" width="348" height="43.5"/> + <rect key="frame" x="0.0" y="0.0" width="348" height="43"/> <autoresizingMask key="autoresizingMask"/> <subviews> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Amw-A3-ePS"> - <rect key="frame" x="16" y="11" width="324" height="21.5"/> + <rect key="frame" x="16" y="11" width="324" height="21"/> <fontDescription key="fontDescription" type="system" pointSize="17"/> <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <nil key="highlightedColor"/> @@ -233,14 +134,14 @@ </connections> </tableViewCell> <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="Basic" id="kzz-4X-xg1" customClass="SettingsBasicCell" customModule="MullvadVPN" customModuleProvider="target"> - <rect key="frame" x="0.0" y="186" width="375" height="43.5"/> + <rect key="frame" x="0.0" y="184.5" width="375" height="43"/> <autoresizingMask key="autoresizingMask"/> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="kzz-4X-xg1" id="KpJ-UC-PyV"> - <rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/> + <rect key="frame" x="0.0" y="0.0" width="375" height="43"/> <autoresizingMask key="autoresizingMask"/> <subviews> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="PWF-Y6-mDf"> - <rect key="frame" x="16" y="11" width="343" height="21.5"/> + <rect key="frame" x="16" y="11" width="343" height="21"/> <fontDescription key="fontDescription" type="system" pointSize="17"/> <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <nil key="highlightedColor"/> @@ -311,8 +212,5 @@ <namedColor name="Secondary"> <color red="0.098039215686274508" green="0.1803921568627451" blue="0.27058823529411763" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> </namedColor> - <namedColor name="Success"> - <color red="0.26666666666666666" green="0.67843137254901964" blue="0.30196078431372547" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> - </namedColor> </resources> </document> diff --git a/ios/MullvadVPN/ConnectViewController.xib b/ios/MullvadVPN/ConnectViewController.xib new file mode 100644 index 0000000000..2cf50c7cef --- /dev/null +++ b/ios/MullvadVPN/ConnectViewController.xib @@ -0,0 +1,116 @@ +<?xml version="1.0" encoding="UTF-8"?> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16097.2" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> + <device id="retina6_1" orientation="portrait" appearance="light"/> + <dependencies> + <deployment identifier="iOS"/> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/> + <capability name="Named colors" minToolsVersion="9.0"/> + <capability name="Safe area layout guides" minToolsVersion="9.0"/> + <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> + </dependencies> + <objects> + <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="ConnectViewController" customModule="MullvadVPN" customModuleProvider="target"> + <connections> + <outlet property="buttonsStackView" destination="tVZ-jT-d0h" id="IRm-TE-iJs"/> + <outlet property="cityLabel" destination="8Qe-Us-gxU" id="qAs-MJ-Quv"/> + <outlet property="connectionPanel" destination="h6t-ky-9gm" id="hOY-G9-IVQ"/> + <outlet property="countryLabel" destination="neK-xr-40H" id="tNC-OD-PTx"/> + <outlet property="secureLabel" destination="dus-AY-JC0" id="PMW-GI-4ga"/> + <outlet property="view" destination="bFH-8p-vRl" id="jVw-4H-ccF"/> + </connections> + </placeholder> + <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> + <view contentMode="scaleToFill" id="bFH-8p-vRl"> + <rect key="frame" x="0.0" y="0.0" width="414" height="896"/> + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> + <subviews> + <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="8" translatesAutoresizingMaskIntoConstraints="NO" id="SON-pD-ZGn"> + <rect key="frame" x="24" y="502" width="366" height="212"/> + <subviews> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="SECURE CONNECTION" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dus-AY-JC0"> + <rect key="frame" x="0.0" y="0.0" width="366" height="24"/> + <accessibility key="accessibilityConfiguration" identifier="SecureConnectionLabel"/> + <fontDescription key="fontDescription" type="boldSystem" pointSize="20"/> + <color key="textColor" name="Success"/> + <nil key="highlightedColor"/> + </label> + <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="daZ-9L-RFn"> + <rect key="frame" x="0.0" y="32" width="366" height="82"/> + <subviews> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Stockholm" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="8Qe-Us-gxU"> + <rect key="frame" x="0.0" y="0.0" width="366" height="41"/> + <fontDescription key="fontDescription" type="boldSystem" pointSize="34"/> + <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> + <nil key="highlightedColor"/> + </label> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Sweden" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsLetterSpacingToFitWidth="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="neK-xr-40H"> + <rect key="frame" x="0.0" y="41" width="366" height="41"/> + <fontDescription key="fontDescription" type="boldSystem" pointSize="34"/> + <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> + <nil key="highlightedColor"/> + </label> + </subviews> + </stackView> + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="mAs-zy-aF9"> + <rect key="frame" x="0.0" y="122" width="366" height="90"/> + <subviews> + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="h6t-ky-9gm" customClass="ConnectionPanelView" customModule="MullvadVPN" customModuleProvider="target"> + <rect key="frame" x="0.0" y="0.0" width="366" height="90"/> + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> + <constraints> + <constraint firstAttribute="height" constant="90" placeholder="YES" id="sqc-lF-rCp"/> + </constraints> + </view> + </subviews> + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> + <constraints> + <constraint firstAttribute="bottom" secondItem="h6t-ky-9gm" secondAttribute="bottom" id="gde-uU-FXR"/> + <constraint firstAttribute="trailing" secondItem="h6t-ky-9gm" secondAttribute="trailing" id="hyx-Rc-2zS"/> + <constraint firstItem="h6t-ky-9gm" firstAttribute="leading" secondItem="mAs-zy-aF9" secondAttribute="leading" id="ivP-qV-nIn"/> + <constraint firstItem="h6t-ky-9gm" firstAttribute="top" secondItem="mAs-zy-aF9" secondAttribute="top" id="zG4-Um-x5m"/> + </constraints> + </view> + </subviews> + </stackView> + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="82Y-rR-Igf"> + <rect key="frame" x="24" y="738" width="366" height="100"/> + <subviews> + <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="fillEqually" spacing="16" translatesAutoresizingMaskIntoConstraints="NO" id="tVZ-jT-d0h"> + <rect key="frame" x="0.0" y="0.0" width="366" height="100"/> + <constraints> + <constraint firstAttribute="height" constant="100" placeholder="YES" id="VS7-pq-Idz"/> + </constraints> + </stackView> + </subviews> + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> + <constraints> + <constraint firstItem="tVZ-jT-d0h" firstAttribute="top" secondItem="82Y-rR-Igf" secondAttribute="top" id="1YE-mx-7t7"/> + <constraint firstItem="tVZ-jT-d0h" firstAttribute="leading" secondItem="82Y-rR-Igf" secondAttribute="leading" id="Dab-DT-04W"/> + <constraint firstAttribute="bottom" secondItem="tVZ-jT-d0h" secondAttribute="bottom" id="Sjj-UF-9Xr"/> + <constraint firstAttribute="trailing" secondItem="tVZ-jT-d0h" secondAttribute="trailing" id="cOe-Ju-VcI"/> + </constraints> + </view> + </subviews> + <color key="backgroundColor" name="Primary"/> + <constraints> + <constraint firstItem="Rzj-xL-crv" firstAttribute="bottom" secondItem="82Y-rR-Igf" secondAttribute="bottom" constant="24" id="D4A-Ij-Eip"/> + <constraint firstItem="Rzj-xL-crv" firstAttribute="trailing" secondItem="82Y-rR-Igf" secondAttribute="trailing" constant="24" id="DPX-JT-0Bx"/> + <constraint firstItem="SON-pD-ZGn" firstAttribute="leading" secondItem="bFH-8p-vRl" secondAttribute="leadingMargin" id="LSL-Go-oXb"/> + <constraint firstItem="82Y-rR-Igf" firstAttribute="leading" secondItem="Rzj-xL-crv" secondAttribute="leading" constant="24" id="UWY-XY-Njv"/> + <constraint firstAttribute="trailingMargin" secondItem="SON-pD-ZGn" secondAttribute="trailing" id="Vhs-Sr-QUI"/> + <constraint firstItem="82Y-rR-Igf" firstAttribute="top" secondItem="SON-pD-ZGn" secondAttribute="bottom" constant="24" id="WhU-py-uqj"/> + </constraints> + <edgeInsets key="layoutMargins" top="0.0" left="24" bottom="24" right="24"/> + <viewLayoutGuide key="safeArea" id="Rzj-xL-crv"/> + <point key="canvasLocation" x="139" y="153"/> + </view> + </objects> + <resources> + <namedColor name="Primary"> + <color red="0.16078431372549021" green="0.30196078431372547" blue="0.45098039215686275" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + </namedColor> + <namedColor name="Success"> + <color red="0.26666666666666666" green="0.67843137254901964" blue="0.30196078431372547" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + </namedColor> + </resources> +</document> diff --git a/ios/MullvadVPN/ViewControllerIdentifier.swift b/ios/MullvadVPN/ViewControllerIdentifier.swift index 1a808d1873..247d31dc60 100644 --- a/ios/MullvadVPN/ViewControllerIdentifier.swift +++ b/ios/MullvadVPN/ViewControllerIdentifier.swift @@ -9,6 +9,5 @@ import Foundation enum ViewControllerIdentifier: String { - case main = "Main" case settings = "Settings" } |
