Commit e0c34bc1 authored by Jose Blaya's avatar Jose Blaya
Browse files

Merge branch '296-piax-favourite-servers-tile' into 'release/3.0.0'

Resolve "PIAX. Favourite Servers Tile"

See merge request ios/vpn-ios!405
parents 3200ccf4 fc966237
This diff is collapsed.
......@@ -17,7 +17,8 @@ enum Cells: Int, EnumsBuilder {
case usage
case networkManagementTool
case quickSettings
case favoriteServers
var identifier: String {
switch self {
case .ipTile: return "IPTileCell"
......@@ -27,6 +28,7 @@ enum Cells: Int, EnumsBuilder {
case .usage: return "UsageTileCell"
case .networkManagementTool: return "NMTTileCell"
case .quickSettings: return "QuickSettingsTileCell"
case .favoriteServers: return "FavoriteServersTileCell"
}
}
......@@ -39,6 +41,7 @@ enum Cells: Int, EnumsBuilder {
case .usage: return "UsageTileCollectionViewCell"
case .networkManagementTool: return "NetworkManagementToolTileCollectionViewCell"
case .quickSettings: return "QuickSettingsTileCollectionViewCell"
case .favoriteServers: return "FavoriteServersTileCollectionViewCell"
}
}
}
......@@ -67,6 +70,9 @@ class DashboardCollectionViewUtil: NSObject {
collectionView.register(UINib(nibName: Cells.quickSettings.className,
bundle: nil),
forCellWithReuseIdentifier: Cells.quickSettings.identifier)
collectionView.register(UINib(nibName: Cells.favoriteServers.className,
bundle: nil),
forCellWithReuseIdentifier: Cells.favoriteServers.identifier)
collectionView.backgroundColor = .clear
}
......
......@@ -589,6 +589,12 @@ internal enum L10n {
}
internal enum Tiles {
internal enum Favorite {
internal enum Servers {
/// Favorite servers
internal static let title = L10n.tr("Localizable", "tiles.favorite.servers.title")
}
}
internal enum Nmt {
/// Cellular
internal static let cellular = L10n.tr("Localizable", "tiles.nmt.cellular")
......
//
// FavoriteServersTile.swift
// PIA VPN
//
// Created by Jose Antonio Blaya Garcia on 03/04/2019.
// Copyright © 2019 London Trust Media. All rights reserved.
//
import Foundation
import PIALibrary
class FavoriteServersTile: UIView, Tileable {
var view: UIView!
var detailSegueIdentifier: String!
var status: TileStatus = .normal {
didSet {
statusUpdated()
}
}
@IBOutlet private weak var tileTitle: UILabel!
@IBOutlet private weak var stackView: UIStackView!
override init(frame: CGRect) {
super.init(frame: frame)
self.xibSetup()
}
required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
self.xibSetup()
self.setupView()
}
deinit {
NotificationCenter.default.removeObserver(self)
}
private func setupView() {
let nc = NotificationCenter.default
nc.addObserver(self, selector: #selector(viewShouldRestyle), name: .PIAThemeDidChange, object: nil)
nc.addObserver(self, selector: #selector(updateFavoriteList), name: .PIAServerHasBeenUpdated, object: nil)
viewShouldRestyle()
self.tileTitle.text = L10n.Tiles.Favorite.Servers.title.uppercased()
updateFavoriteList()
}
@objc private func viewShouldRestyle() {
tileTitle.style(style: TextStyle.textStyle21)
Theme.current.applyPrincipalBackground(self)
}
@objc private func updateFavoriteList() {
let currentServers = Client.providers.serverProvider.currentServers
for containerView in stackView.subviews {
if let button = containerView.subviews.first as? ServerButton {
button.setImage(Theme.current.palette.appearance == .light ? Asset.Piax.Tiles.quickConnectPlaceholderLight.image :
Asset.Piax.Tiles.quickConnectPlaceholderDark.image, for: .normal)
button.imageView?.contentMode = .scaleAspectFit
button.isUserInteractionEnabled = false
}
}
var favServers: [Server] = []
for identifier in AppPreferences.shared.favoriteServerIdentifiers.reversed() {
if let server = currentServers.first(where: { return $0.identifier == identifier }) {
favServers.append(server)
}
}
for (index, server) in favServers.enumerated() where index < stackView.subviews.count {
let view = stackView.subviews[index]
if let button = view.subviews.first as? ServerButton {
button.alpha = 1
button.setImage(fromServer: server)
button.imageView?.contentMode = .scaleAspectFit
button.isUserInteractionEnabled = true
button.server = server
}
}
}
@IBAction private func connectToServer(_ sender: ServerButton) {
if let server = sender.server {
let currentServer = Client.preferences.displayedServer
guard (server.identifier != currentServer.identifier) else {
return
}
Client.preferences.displayedServer = server
NotificationCenter.default.post(name: .PIAThemeDidChange,
object: self,
userInfo: nil)
NotificationCenter.default.post(name: .PIAServerHasBeenUpdated,
object: self,
userInfo: nil)
}
}
private func statusUpdated() {
updateFavoriteList()
}
}
//
// FavoriteServersTileCollectionViewCell.swift
// PIA VPN
//
// Created by Jose Antonio Blaya Garcia on 03/04/2019.
// Copyright © 2019 London Trust Media. All rights reserved.
//
import UIKit
import PIALibrary
class FavoriteServersTileCollectionViewCell: UICollectionViewCell, TileableCell {
var tileType: AvailableTiles = .favoriteServers
typealias Entity = FavoriteServersTile
@IBOutlet private weak var tile: Entity!
@IBOutlet weak var accessoryImageRight: UIImageView!
@IBOutlet weak var accessoryButtonLeft: UIButton!
@IBOutlet weak var tileLeftConstraint: NSLayoutConstraint!
@IBOutlet weak var tileRightConstraint: NSLayoutConstraint!
private var currentTileStatus: TileStatus?
func setupCellForStatus(_ status: TileStatus) {
Theme.current.applyPrincipalBackground(self)
Theme.current.applyPrincipalBackground(self.contentView)
self.accessoryImageRight.image = Theme.current.dragDropImage()
tile.status = status
let animationDuration = currentTileStatus != nil ? AppConfiguration.Animations.duration : 0
UIView.animate(withDuration: animationDuration, animations: {
switch status {
case .normal:
self.tileLeftConstraint.constant = 0
self.tileRightConstraint.constant = 0
case .edit:
self.tileLeftConstraint.constant = self.leftConstraintValue
self.tileRightConstraint.constant = self.rightConstraintValue
self.setupVisibilityButton()
}
self.layoutIfNeeded()
self.currentTileStatus = status
})
}
private func setupVisibilityButton() {
if Client.providers.tileProvider.visibleTiles.contains(tileType) {
accessoryButtonLeft.setImage(Theme.current.activeEyeImage(), for: .normal)
accessoryButtonLeft.setImage(Theme.current.inactiveEyeImage(), for: .highlighted)
} else {
accessoryButtonLeft.setImage(Theme.current.inactiveEyeImage(), for: .normal)
accessoryButtonLeft.setImage(Theme.current.activeEyeImage(), for: .highlighted)
}
}
@IBAction private func changeTileVisibility() {
var visibleTiles = Client.providers.tileProvider.visibleTiles
if Client.providers.tileProvider.visibleTiles.contains(tileType) {
let tiles = visibleTiles.filter { $0 != tileType }
Client.providers.tileProvider.visibleTiles = tiles
} else {
visibleTiles.append(tileType)
Client.providers.tileProvider.visibleTiles = visibleTiles
}
Macros.postNotification(.PIATilesDidChange)
}
}
......@@ -234,6 +234,7 @@
// TILES
"tiles.quick.connect.title" = "Quick connect";
"tiles.favorite.servers.title" = "Favorite servers";
"tiles.region.title" = "VPN Server";
"tiles.subscription.title" = "Subscription";
"tiles.subscription.trial" = "Trial";
......
......@@ -56,7 +56,7 @@ end
def shared_main_pods
pod 'AlamofireImage'
#library_by_path('')
library_by_git('d1e8121')
library_by_git('12c21b4')
#library_by_version('~> 1.1.3')
end
......
......@@ -114,10 +114,10 @@ DEPENDENCIES:
- FXPageControl
- HockeySDK
- iRate
- PIALibrary/Library (from `https://github.com/pia-foss/client-library-apple`, commit `d1e8121`)
- PIALibrary/Mock (from `https://github.com/pia-foss/client-library-apple`, commit `d1e8121`)
- PIALibrary/UI (from `https://github.com/pia-foss/client-library-apple`, commit `d1e8121`)
- PIALibrary/VPN (from `https://github.com/pia-foss/client-library-apple`, commit `d1e8121`)
- PIALibrary/Library (from `https://github.com/pia-foss/client-library-apple`, commit `12c21b4`)
- PIALibrary/Mock (from `https://github.com/pia-foss/client-library-apple`, commit `12c21b4`)
- PIALibrary/UI (from `https://github.com/pia-foss/client-library-apple`, commit `12c21b4`)
- PIALibrary/VPN (from `https://github.com/pia-foss/client-library-apple`, commit `12c21b4`)
- PIATunnel (from `https://github.com/pia-foss/tunnel-apple`, commit `257296c`)
- PopupDialog
- SideMenu (= 3.1.5)
......@@ -154,7 +154,7 @@ SPEC REPOS:
EXTERNAL SOURCES:
PIALibrary:
:commit: d1e8121
:commit: 12c21b4
:git: https://github.com/pia-foss/client-library-apple
PIATunnel:
:commit: 257296c
......@@ -162,7 +162,7 @@ EXTERNAL SOURCES:
CHECKOUT OPTIONS:
PIALibrary:
:commit: d1e8121
:commit: 12c21b4
:git: https://github.com/pia-foss/client-library-apple
PIATunnel:
:commit: 257296c
......@@ -198,6 +198,6 @@ SPEC CHECKSUMS:
SwiftyBeaver: 4cc0080d2e23f980652e28978db11a5c9da39165
TPKeyboardAvoiding: cb69d5ddbe90ce0170e4bc2db1e5e41d4a3ad9a4
PODFILE CHECKSUM: b24bf5326926c4c8cfe1727a5839d1d0df21363d
PODFILE CHECKSUM: a2e8ff0b229a23da7492cf8566804e855d97b5e1
COCOAPODS: 1.5.3
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/>
<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="FavoriteServersTile" customModule="PIA_VPN" customModuleProvider="target">
<connections>
<outlet property="stackView" destination="9eh-pB-Hca" id="5ta-3i-szt"/>
<outlet property="tileTitle" destination="6aZ-dJ-EIp" id="8O5-qp-crN"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="Jne-FW-OGR">
<rect key="frame" x="0.0" y="0.0" width="365" height="89"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="6aZ-dJ-EIp">
<rect key="frame" x="25" y="15" width="0.0" height="0.0"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" spacing="8" translatesAutoresizingMaskIntoConstraints="NO" id="9eh-pB-Hca">
<rect key="frame" x="25" y="34" width="315" height="40"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="QDf-Ol-AIs">
<rect key="frame" x="0.0" y="0.0" width="46" height="40"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="SNw-pW-RjA" customClass="ServerButton" customModule="PIA_VPN" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="46" height="40"/>
<connections>
<action selector="connectToServer:" destination="-1" eventType="touchUpInside" id="vfc-tz-Uuc"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="SNw-pW-RjA" firstAttribute="top" secondItem="QDf-Ol-AIs" secondAttribute="top" id="Dza-hF-WT1"/>
<constraint firstAttribute="trailing" secondItem="SNw-pW-RjA" secondAttribute="trailing" id="Ske-11-heh"/>
<constraint firstItem="SNw-pW-RjA" firstAttribute="leading" secondItem="QDf-Ol-AIs" secondAttribute="leading" id="ab1-2Q-VjH"/>
<constraint firstAttribute="bottom" secondItem="SNw-pW-RjA" secondAttribute="bottom" id="hxp-ki-hwH"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="KNm-BM-Ik6">
<rect key="frame" x="54" y="0.0" width="45.5" height="40"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Rp7-aT-ODg" customClass="ServerButton" customModule="PIA_VPN" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="45.5" height="40"/>
<connections>
<action selector="connectToServer:" destination="-1" eventType="touchUpInside" id="ZVo-BE-ENk"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="Rp7-aT-ODg" firstAttribute="top" secondItem="KNm-BM-Ik6" secondAttribute="top" id="7yz-A9-Msf"/>
<constraint firstItem="Rp7-aT-ODg" firstAttribute="leading" secondItem="KNm-BM-Ik6" secondAttribute="leading" id="KoP-pI-ewg"/>
<constraint firstAttribute="bottom" secondItem="Rp7-aT-ODg" secondAttribute="bottom" id="ZXq-j3-hXn"/>
<constraint firstAttribute="trailing" secondItem="Rp7-aT-ODg" secondAttribute="trailing" id="kWf-0H-pbt"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ryJ-1b-2pr">
<rect key="frame" x="107.5" y="0.0" width="46" height="40"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="oXl-ye-biF" customClass="ServerButton" customModule="PIA_VPN" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="46" height="40"/>
<connections>
<action selector="connectToServer:" destination="-1" eventType="touchUpInside" id="Q5C-V1-icf"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="bottom" secondItem="oXl-ye-biF" secondAttribute="bottom" id="791-u4-NPw"/>
<constraint firstAttribute="trailing" secondItem="oXl-ye-biF" secondAttribute="trailing" id="NUA-xq-ITj"/>
<constraint firstItem="oXl-ye-biF" firstAttribute="leading" secondItem="ryJ-1b-2pr" secondAttribute="leading" id="k8x-rc-qjI"/>
<constraint firstItem="oXl-ye-biF" firstAttribute="top" secondItem="ryJ-1b-2pr" secondAttribute="top" id="p1t-VU-WQM"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="BJ1-gb-exs">
<rect key="frame" x="161.5" y="0.0" width="46" height="40"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="BAH-qY-K0z" customClass="ServerButton" customModule="PIA_VPN" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="46" height="40"/>
<connections>
<action selector="connectToServer:" destination="-1" eventType="touchUpInside" id="8R2-dZ-zX2"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="bottom" secondItem="BAH-qY-K0z" secondAttribute="bottom" id="F9Y-CI-IxH"/>
<constraint firstAttribute="trailing" secondItem="BAH-qY-K0z" secondAttribute="trailing" id="PXk-NE-HBv"/>
<constraint firstItem="BAH-qY-K0z" firstAttribute="top" secondItem="BJ1-gb-exs" secondAttribute="top" id="VQo-RA-XlW"/>
<constraint firstItem="BAH-qY-K0z" firstAttribute="leading" secondItem="BJ1-gb-exs" secondAttribute="leading" id="l84-Tk-0jc"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="3gQ-dC-TML">
<rect key="frame" x="215.5" y="0.0" width="45.5" height="40"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="pE1-jq-MVA" customClass="ServerButton" customModule="PIA_VPN" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="45.5" height="40"/>
<connections>
<action selector="connectToServer:" destination="-1" eventType="touchUpInside" id="9eA-DS-uUl"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="pE1-jq-MVA" secondAttribute="trailing" id="Erg-NJ-X6P"/>
<constraint firstItem="pE1-jq-MVA" firstAttribute="leading" secondItem="3gQ-dC-TML" secondAttribute="leading" id="inb-R8-uS7"/>
<constraint firstAttribute="bottom" secondItem="pE1-jq-MVA" secondAttribute="bottom" id="ldv-eS-QG9"/>
<constraint firstItem="pE1-jq-MVA" firstAttribute="top" secondItem="3gQ-dC-TML" secondAttribute="top" id="lpi-Ie-Vs0"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="bS5-9Y-Jcr">
<rect key="frame" x="269" y="0.0" width="46" height="40"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="7aD-4Y-J37" customClass="ServerButton" customModule="PIA_VPN" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="46" height="40"/>
<connections>
<action selector="connectToServer:" destination="-1" eventType="touchUpInside" id="3Qa-KW-9kg"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="7aD-4Y-J37" firstAttribute="leading" secondItem="bS5-9Y-Jcr" secondAttribute="leading" id="IkE-Wk-lnp"/>
<constraint firstAttribute="trailing" secondItem="7aD-4Y-J37" secondAttribute="trailing" id="Oau-q7-KkY"/>
<constraint firstItem="7aD-4Y-J37" firstAttribute="top" secondItem="bS5-9Y-Jcr" secondAttribute="top" id="t9I-g7-Tnn"/>
<constraint firstAttribute="bottom" secondItem="7aD-4Y-J37" secondAttribute="bottom" id="ybd-5w-lWE"/>
</constraints>
</view>
</subviews>
<constraints>
<constraint firstAttribute="height" constant="40" id="Jp8-cw-Uht"/>
</constraints>
</stackView>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="6aZ-dJ-EIp" firstAttribute="top" secondItem="Jne-FW-OGR" secondAttribute="top" constant="15" id="F4e-i9-igd"/>
<constraint firstItem="9eh-pB-Hca" firstAttribute="leading" secondItem="Iuh-fe-bTm" secondAttribute="leading" constant="25" id="HOz-m1-QFg"/>
<constraint firstItem="6aZ-dJ-EIp" firstAttribute="leading" secondItem="Iuh-fe-bTm" secondAttribute="leading" constant="25" id="Jes-7k-0zG"/>
<constraint firstAttribute="bottom" secondItem="9eh-pB-Hca" secondAttribute="bottom" constant="15" id="euo-oq-3DM"/>
<constraint firstItem="Iuh-fe-bTm" firstAttribute="trailing" secondItem="9eh-pB-Hca" secondAttribute="trailing" constant="25" id="lqK-fp-p1L"/>
</constraints>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<viewLayoutGuide key="safeArea" id="Iuh-fe-bTm"/>
<point key="canvasLocation" x="55.200000000000003" y="48.125937031484263"/>
</view>
</objects>
</document>
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/>
<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"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="FavoriteServersTileCell" id="N3s-qD-tnh" customClass="FavoriteServersTileCollectionViewCell" customModule="PIA_VPN" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="668" height="128"/>
<autoresizingMask key="autoresizingMask"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
<rect key="frame" x="0.0" y="0.0" width="668" height="128"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="right" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="vRc-9Q-wei">
<rect key="frame" x="0.0" y="47" width="34" height="34"/>
<constraints>
<constraint firstAttribute="width" constant="34" id="wmW-Q2-nHa"/>
<constraint firstAttribute="height" constant="34" id="zaN-sr-XX2"/>
</constraints>
<state key="normal" image="eye-active-dark"/>
<connections>
<action selector="changeTileVisibility" destination="N3s-qD-tnh" eventType="touchUpInside" id="tJP-Lv-ct4"/>
</connections>
</button>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="open-tile-details" translatesAutoresizingMaskIntoConstraints="NO" id="Lcn-2V-lSs">
<rect key="frame" x="641" y="58" width="12" height="12"/>
</imageView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Exh-ge-9X3" customClass="FavoriteServersTile" customModule="PIA_VPN" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="668" height="128"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</view>
</subviews>
</view>
<constraints>
<constraint firstItem="Lcn-2V-lSs" firstAttribute="width" secondItem="Lcn-2V-lSs" secondAttribute="height" multiplier="1:1" id="AP3-E9-14N"/>
<constraint firstItem="Exh-ge-9X3" firstAttribute="leading" secondItem="N3s-qD-tnh" secondAttribute="leading" id="BYg-dc-z41"/>
<constraint firstItem="vRc-9Q-wei" firstAttribute="leading" secondItem="N3s-qD-tnh" secondAttribute="leading" id="JbL-rr-QpI"/>
<constraint firstItem="Exh-ge-9X3" firstAttribute="top" secondItem="N3s-qD-tnh" secondAttribute="top" id="Vws-Rf-Ghr"/>
<constraint firstAttribute="bottom" secondItem="Exh-ge-9X3" secondAttribute="bottom" id="bNC-4o-9Aj"/>
<constraint firstItem="Lcn-2V-lSs" firstAttribute="centerY" secondItem="N3s-qD-tnh" secondAttribute="centerY" id="bnr-Qg-dVk"/>
<constraint firstItem="vRc-9Q-wei" firstAttribute="centerY" secondItem="N3s-qD-tnh" secondAttribute="centerY" id="eFZ-ey-93W"/>
<constraint firstAttribute="trailing" secondItem="Lcn-2V-lSs" secondAttribute="trailing" constant="15" id="kem-rP-nXr"/>
<constraint firstAttribute="trailing" secondItem="Exh-ge-9X3" secondAttribute="trailing" id="qOp-lu-Zwm"/>
</constraints>
<viewLayoutGuide key="safeArea" id="ifX-eE-4k8"/>
<size key="customSize" width="668" height="128"/>
<connections>
<outlet property="accessoryButtonLeft" destination="vRc-9Q-wei" id="xMn-mb-j4g"/>
<outlet property="accessoryImageRight" destination="Lcn-2V-lSs" id="x3y-7D-8m6"/>
<outlet property="tile" destination="Exh-ge-9X3" id="tVX-BA-WwD"/>
<outlet property="tileLeftConstraint" destination="BYg-dc-z41" id="DYC-JN-39B"/>
<outlet property="tileRightConstraint" destination="qOp-lu-Zwm" id="oSc-hJ-RJr"/>
</connections>
<point key="canvasLocation" x="-179.19999999999999" y="76.46176911544228"/>
</collectionViewCell>
</objects>
<resources>
<image name="eye-active-dark" width="17" height="11"/>
<image name="open-tile-details" width="12" height="12"/>
</resources>
</document>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment