summaryrefslogtreecommitdiffhomepage
path: root/ios
diff options
context:
space:
mode:
authorAndrej Mihajlov <and@mullvad.net>2021-11-24 12:57:27 +0100
committerAndrej Mihajlov <and@mullvad.net>2021-11-26 13:55:31 +0100
commit78555138aefbfa27cf9e1bd009bac33d898c3d8d (patch)
tree4ef5bd126610cf8603afd7f23a0a8afbb6e35a49 /ios
parent4f1ce838416f438967aa6e65332976711cb47533 (diff)
downloadmullvadvpn-78555138aefbfa27cf9e1bd009bac33d898c3d8d.tar.xz
mullvadvpn-78555138aefbfa27cf9e1bd009bac33d898c3d8d.zip
Update launch screen
Diffstat (limited to 'ios')
-rw-r--r--ios/MullvadVPN.xcodeproj/project.pbxproj4
-rw-r--r--ios/MullvadVPN/AppDelegate.swift4
-rw-r--r--ios/MullvadVPN/LaunchScreen.storyboard39
-rw-r--r--ios/MullvadVPN/LaunchViewController.swift41
4 files changed, 76 insertions, 12 deletions
diff --git a/ios/MullvadVPN.xcodeproj/project.pbxproj b/ios/MullvadVPN.xcodeproj/project.pbxproj
index 114e831799..55f084cac7 100644
--- a/ios/MullvadVPN.xcodeproj/project.pbxproj
+++ b/ios/MullvadVPN.xcodeproj/project.pbxproj
@@ -260,6 +260,7 @@
58E1336D26D2BE7500CC316B /* AnyResult.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58E1336C26D2BE7500CC316B /* AnyResult.swift */; };
58E1336E26D2BE7500CC316B /* AnyResult.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58E1336C26D2BE7500CC316B /* AnyResult.swift */; };
58E1336F26D2BE7500CC316B /* AnyResult.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58E1336C26D2BE7500CC316B /* AnyResult.swift */; };
+ 58E20771274672CA00DE5D77 /* LaunchViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58E20770274672CA00DE5D77 /* LaunchViewController.swift */; };
58E6771F24ADFE7800AA26E7 /* SettingsNavigationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58E6771E24ADFE7800AA26E7 /* SettingsNavigationController.swift */; };
58EE2E3A272FF814003BFF93 /* SettingsDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58EE2E38272FF814003BFF93 /* SettingsDataSource.swift */; };
58EE2E3B272FF814003BFF93 /* SettingsDataSourceDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58EE2E39272FF814003BFF93 /* SettingsDataSourceDelegate.swift */; };
@@ -526,6 +527,7 @@
58E1337426D2BEC400CC316B /* Promise+Optional.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Promise+Optional.swift"; sourceTree = "<group>"; };
58E1337826D2BEDD00CC316B /* Promise+ReceiveOn.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Promise+ReceiveOn.swift"; sourceTree = "<group>"; };
58E1338026D2BF5C00CC316B /* Promise+Result.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Promise+Result.swift"; sourceTree = "<group>"; };
+ 58E20770274672CA00DE5D77 /* LaunchViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LaunchViewController.swift; sourceTree = "<group>"; };
58E6771E24ADFE7800AA26E7 /* SettingsNavigationController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsNavigationController.swift; sourceTree = "<group>"; };
58E973DD24850EB600096F90 /* AsyncOperation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AsyncOperation.swift; sourceTree = "<group>"; };
58ECD29123F178FD004298B6 /* Screenshots.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Screenshots.xcconfig; sourceTree = "<group>"; };
@@ -852,6 +854,7 @@
58561C98239A5D1500BD6B5E /* IPEndpoint.swift */,
58FB865626E8C06800F188BC /* Keychain */,
58727282265D173C00F315B2 /* LaunchScreen.storyboard */,
+ 58E20770274672CA00DE5D77 /* LaunchViewController.swift */,
58A1AA8623F43901009F7EA6 /* Location.swift */,
583DA21325FA4B5C00318683 /* LocationDataSource.swift */,
58BA692D23E99EFF009DC256 /* Locking.swift */,
@@ -1437,6 +1440,7 @@
585DA89626B0328000B8C587 /* TunnelIPCResponse.swift in Sources */,
587AD7C623421D7000E93A53 /* TunnelSettings.swift in Sources */,
581503A324D6F1EC00C9C50E /* ChainedError+Logger.swift in Sources */,
+ 58E20771274672CA00DE5D77 /* LaunchViewController.swift in Sources */,
584D26C4270C855B004EA533 /* PreferencesDataSource.swift in Sources */,
58FD5BF024238EB300112C88 /* SKProduct+Formatting.swift in Sources */,
58B43C1925F77DB60002C8C3 /* ConnectMainContentView.swift in Sources */,
diff --git a/ios/MullvadVPN/AppDelegate.swift b/ios/MullvadVPN/AppDelegate.swift
index 8fa8bdad0c..c908637ecd 100644
--- a/ios/MullvadVPN/AppDelegate.swift
+++ b/ios/MullvadVPN/AppDelegate.swift
@@ -76,9 +76,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
self.window = UIWindow(frame: UIScreen.main.bounds)
// Set an empty view controller while loading tunnels
- let launchController = UIViewController()
- launchController.view.backgroundColor = .primaryColor
- self.window?.rootViewController = launchController
+ self.window?.rootViewController = LaunchViewController()
// Add relay cache observer
RelayCache.Tracker.shared.addObserver(self)
diff --git a/ios/MullvadVPN/LaunchScreen.storyboard b/ios/MullvadVPN/LaunchScreen.storyboard
index 41a4f2f5e9..a3287d9019 100644
--- a/ios/MullvadVPN/LaunchScreen.storyboard
+++ b/ios/MullvadVPN/LaunchScreen.storyboard
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15505" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="19455" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
- <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15510"/>
- <capability name="Named colors" minToolsVersion="9.0"/>
+ <deployment identifier="iOS"/>
+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19454"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
@@ -11,22 +11,43 @@
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
- <viewController id="01J-lp-oVM" sceneMemberID="viewController">
+ <viewController interfaceStyle="light" id="01J-lp-oVM" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
- <color key="backgroundColor" name="Primary"/>
+ <subviews>
+ <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="LogoIcon" translatesAutoresizingMaskIntoConstraints="NO" id="gqd-e9-Kvh">
+ <rect key="frame" x="143" y="278" width="128" height="128"/>
+ <constraints>
+ <constraint firstAttribute="width" constant="128" id="9xD-Oe-2Cf"/>
+ <constraint firstAttribute="width" secondItem="gqd-e9-Kvh" secondAttribute="height" multiplier="1:1" id="NMd-KF-nJ6"/>
+ </constraints>
+ </imageView>
+ <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="LogoText" translatesAutoresizingMaskIntoConstraints="NO" id="iHl-91-lx9">
+ <rect key="frame" x="87" y="436" width="240" height="24"/>
+ <constraints>
+ <constraint firstAttribute="width" constant="240" id="jnP-3w-LWl"/>
+ <constraint firstAttribute="height" constant="24" id="zcN-3F-btf"/>
+ </constraints>
+ </imageView>
+ </subviews>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
+ <color key="backgroundColor" red="0.16078431372549018" green="0.30196078431372547" blue="0.45098039215686275" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+ <constraints>
+ <constraint firstItem="gqd-e9-Kvh" firstAttribute="centerX" secondItem="iHl-91-lx9" secondAttribute="centerX" id="Nbt-d1-lBB"/>
+ <constraint firstItem="iHl-91-lx9" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="RWR-ui-Ujt"/>
+ <constraint firstItem="iHl-91-lx9" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="dKZ-dh-pjb"/>
+ <constraint firstItem="iHl-91-lx9" firstAttribute="top" secondItem="gqd-e9-Kvh" secondAttribute="bottom" constant="30" id="dwx-Xi-Gbn"/>
+ </constraints>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
- <point key="canvasLocation" x="53" y="375"/>
+ <point key="canvasLocation" x="52.173913043478265" y="375"/>
</scene>
</scenes>
<resources>
- <namedColor name="Primary">
- <color red="0.16078431372549021" green="0.30196078431372547" blue="0.45098039215686275" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
- </namedColor>
+ <image name="LogoIcon" width="253" height="253"/>
+ <image name="LogoText" width="960" height="104"/>
</resources>
</document>
diff --git a/ios/MullvadVPN/LaunchViewController.swift b/ios/MullvadVPN/LaunchViewController.swift
new file mode 100644
index 0000000000..f108d8f6e4
--- /dev/null
+++ b/ios/MullvadVPN/LaunchViewController.swift
@@ -0,0 +1,41 @@
+//
+// LaunchViewController.swift
+// MullvadVPN
+//
+// Created by pronebird on 18/11/2021.
+// Copyright © 2021 Mullvad VPN AB. All rights reserved.
+//
+
+import UIKit
+
+class LaunchViewController: UIViewController {
+
+ override var preferredStatusBarStyle: UIStatusBarStyle {
+ return .lightContent
+ }
+
+ init() {
+ super.init(nibName: nil, bundle: nil)
+
+ let storyboard = UIStoryboard(name: "LaunchScreen", bundle: nil)
+
+ guard let initialController = storyboard.instantiateInitialViewController() else { return }
+
+ initialController.view.translatesAutoresizingMaskIntoConstraints = false
+
+ addChild(initialController)
+ view.addSubview(initialController.view)
+ initialController.didMove(toParent: self)
+
+ NSLayoutConstraint.activate([
+ initialController.view.topAnchor.constraint(equalTo: view.topAnchor),
+ initialController.view.bottomAnchor.constraint(equalTo: view.bottomAnchor),
+ initialController.view.leadingAnchor.constraint(equalTo: view.leadingAnchor),
+ initialController.view.trailingAnchor.constraint(equalTo: view.trailingAnchor),
+ ])
+ }
+
+ required init?(coder: NSCoder) {
+ fatalError("init(coder:) has not been implemented")
+ }
+}