parent
f64ac3ed27
commit
3bf0aa4eb4
@ -0,0 +1,19 @@ |
||||
// |
||||
// Fonts.swift |
||||
// TournamentStats |
||||
// |
||||
// Created by Laurent Morvillier on 15/08/2019. |
||||
// Copyright © 2019 Stax River. All rights reserved. |
||||
// |
||||
|
||||
import Foundation |
||||
import UIKit |
||||
|
||||
class Fonts { |
||||
|
||||
static let mainTitle: UIFont = UIFont.systemFont(ofSize: 64.0) |
||||
static let subTitle: UIFont = UIFont.systemFont(ofSize: 24.0) |
||||
static let pieChartEntries: UIFont = UIFont.boldSystemFont(ofSize: 28) |
||||
static let chartLegend: UIFont = UIFont.systemFont(ofSize: 18.0) |
||||
|
||||
} |
||||
@ -0,0 +1,24 @@ |
||||
// |
||||
// File.swift |
||||
// TournamentStats |
||||
// |
||||
// Created by Laurent Morvillier on 15/08/2019. |
||||
// Copyright © 2019 Stax River. All rights reserved. |
||||
// |
||||
|
||||
import Foundation |
||||
import UIKit |
||||
|
||||
class Label: UILabel { |
||||
|
||||
required init?(coder aDecoder: NSCoder) { |
||||
super.init(coder: aDecoder) |
||||
self._initialize() |
||||
} |
||||
|
||||
fileprivate func _initialize() { |
||||
self.textColor = UIColor.white |
||||
self.font = Fonts.subTitle |
||||
} |
||||
|
||||
} |
||||
@ -0,0 +1,280 @@ |
||||
<?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"/> |
||||
<view contentMode="scaleToFill" id="iN0-l3-epB" customClass="InfographyView" customModule="TournamentStats" customModuleProvider="target"> |
||||
<rect key="frame" x="0.0" y="0.0" width="1800" height="3500"/> |
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> |
||||
<subviews> |
||||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="w79-xx-Evx"> |
||||
<rect key="frame" x="8" y="44" width="1784" height="2630"/> |
||||
<subviews> |
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="2019 WSOP" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="4Hu-Ou-nFd"> |
||||
<rect key="frame" x="0.0" y="0.0" width="1784" height="100"/> |
||||
<constraints> |
||||
<constraint firstAttribute="height" constant="100" id="mMK-PI-eZm"/> |
||||
</constraints> |
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/> |
||||
<nil key="textColor"/> |
||||
<nil key="highlightedColor"/> |
||||
</label> |
||||
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillProportionally" translatesAutoresizingMaskIntoConstraints="NO" id="aDf-a7-TD5"> |
||||
<rect key="frame" x="0.0" y="110" width="1784" height="50"/> |
||||
<subviews> |
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Hf2-oh-1Oz" customClass="Label" customModule="TournamentStats" customModuleProvider="target"> |
||||
<rect key="frame" x="0.0" y="0.0" width="594.5" height="50"/> |
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/> |
||||
<nil key="textColor"/> |
||||
<nil key="highlightedColor"/> |
||||
</label> |
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="US0-bW-Fa3" customClass="Label" customModule="TournamentStats" customModuleProvider="target"> |
||||
<rect key="frame" x="594.5" y="0.0" width="595" height="50"/> |
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/> |
||||
<nil key="textColor"/> |
||||
<nil key="highlightedColor"/> |
||||
</label> |
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="7a3-eu-I7F" customClass="Label" customModule="TournamentStats" customModuleProvider="target"> |
||||
<rect key="frame" x="1189.5" y="0.0" width="594.5" height="50"/> |
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/> |
||||
<nil key="textColor"/> |
||||
<nil key="highlightedColor"/> |
||||
</label> |
||||
</subviews> |
||||
<constraints> |
||||
<constraint firstAttribute="height" constant="50" id="3re-Nx-rm3"/> |
||||
</constraints> |
||||
</stackView> |
||||
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" spacing="16" translatesAutoresizingMaskIntoConstraints="NO" id="ABP-ce-MDa"> |
||||
<rect key="frame" x="0.0" y="170" width="1784" height="400"/> |
||||
<subviews> |
||||
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="grouped" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" sectionFooterHeight="18" translatesAutoresizingMaskIntoConstraints="NO" id="HbR-TC-HeD" customClass="TableView" customModule="TournamentStats" customModuleProvider="target"> |
||||
<rect key="frame" x="0.0" y="0.0" width="584" height="400"/> |
||||
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/> |
||||
</tableView> |
||||
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="grouped" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" sectionFooterHeight="18" translatesAutoresizingMaskIntoConstraints="NO" id="AOY-yE-egI" customClass="TableView" customModule="TournamentStats" customModuleProvider="target"> |
||||
<rect key="frame" x="600" y="0.0" width="584" height="400"/> |
||||
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/> |
||||
</tableView> |
||||
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="grouped" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" sectionFooterHeight="18" translatesAutoresizingMaskIntoConstraints="NO" id="D9l-DT-eiv" customClass="TableView" customModule="TournamentStats" customModuleProvider="target"> |
||||
<rect key="frame" x="1200" y="0.0" width="584" height="400"/> |
||||
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/> |
||||
</tableView> |
||||
</subviews> |
||||
<constraints> |
||||
<constraint firstAttribute="height" constant="400" id="LQg-JD-2Lr"/> |
||||
</constraints> |
||||
</stackView> |
||||
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillProportionally" translatesAutoresizingMaskIntoConstraints="NO" id="91U-hc-Oqn"> |
||||
<rect key="frame" x="0.0" y="580" width="1784" height="40"/> |
||||
<subviews> |
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Hcr-dr-rUz" customClass="Label" customModule="TournamentStats" customModuleProvider="target"> |
||||
<rect key="frame" x="0.0" y="0.0" width="594.5" height="40"/> |
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/> |
||||
<nil key="textColor"/> |
||||
<nil key="highlightedColor"/> |
||||
</label> |
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="2yf-Z5-Tpy" customClass="Label" customModule="TournamentStats" customModuleProvider="target"> |
||||
<rect key="frame" x="594.5" y="0.0" width="595" height="40"/> |
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/> |
||||
<nil key="textColor"/> |
||||
<nil key="highlightedColor"/> |
||||
</label> |
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hcG-kJ-HS1" customClass="Label" customModule="TournamentStats" customModuleProvider="target"> |
||||
<rect key="frame" x="1189.5" y="0.0" width="594.5" height="40"/> |
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/> |
||||
<nil key="textColor"/> |
||||
<nil key="highlightedColor"/> |
||||
</label> |
||||
</subviews> |
||||
<constraints> |
||||
<constraint firstAttribute="height" constant="40" id="RgL-e2-Q4s"/> |
||||
</constraints> |
||||
</stackView> |
||||
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" spacing="16" translatesAutoresizingMaskIntoConstraints="NO" id="4u9-3E-Qwu"> |
||||
<rect key="frame" x="0.0" y="630" width="1784" height="500"/> |
||||
<subviews> |
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Zmk-PV-di2"> |
||||
<rect key="frame" x="0.0" y="0.0" width="584" height="500"/> |
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
||||
</view> |
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="iQu-2n-Y3T"> |
||||
<rect key="frame" x="600" y="0.0" width="584" height="500"/> |
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
||||
</view> |
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="OZT-Lo-t7S"> |
||||
<rect key="frame" x="1200" y="0.0" width="584" height="500"/> |
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
||||
</view> |
||||
</subviews> |
||||
<constraints> |
||||
<constraint firstAttribute="height" constant="500" id="zmA-DP-mDx"/> |
||||
</constraints> |
||||
</stackView> |
||||
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillProportionally" translatesAutoresizingMaskIntoConstraints="NO" id="RgJ-XU-xav"> |
||||
<rect key="frame" x="0.0" y="1140" width="1784" height="50"/> |
||||
<subviews> |
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="zHz-52-q8s" customClass="Label" customModule="TournamentStats" customModuleProvider="target"> |
||||
<rect key="frame" x="0.0" y="0.0" width="892" height="50"/> |
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/> |
||||
<nil key="textColor"/> |
||||
<nil key="highlightedColor"/> |
||||
</label> |
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="PFl-bw-SwB" customClass="Label" customModule="TournamentStats" customModuleProvider="target"> |
||||
<rect key="frame" x="892" y="0.0" width="892" height="50"/> |
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/> |
||||
<nil key="textColor"/> |
||||
<nil key="highlightedColor"/> |
||||
</label> |
||||
</subviews> |
||||
<constraints> |
||||
<constraint firstAttribute="height" constant="50" id="0cN-fx-oRp"/> |
||||
</constraints> |
||||
</stackView> |
||||
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" spacing="16" translatesAutoresizingMaskIntoConstraints="NO" id="ucv-f0-P2r"> |
||||
<rect key="frame" x="0.0" y="1200" width="1784" height="400"/> |
||||
<subviews> |
||||
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="grouped" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" sectionFooterHeight="18" translatesAutoresizingMaskIntoConstraints="NO" id="0h6-mp-rHD" customClass="TableView" customModule="TournamentStats" customModuleProvider="target"> |
||||
<rect key="frame" x="0.0" y="0.0" width="884" height="400"/> |
||||
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/> |
||||
</tableView> |
||||
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="grouped" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" sectionFooterHeight="18" translatesAutoresizingMaskIntoConstraints="NO" id="WPJ-0S-klg" customClass="TableView" customModule="TournamentStats" customModuleProvider="target"> |
||||
<rect key="frame" x="900" y="0.0" width="884" height="400"/> |
||||
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/> |
||||
</tableView> |
||||
</subviews> |
||||
<constraints> |
||||
<constraint firstAttribute="height" constant="400" id="Qi4-FK-vXH"/> |
||||
</constraints> |
||||
</stackView> |
||||
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillProportionally" translatesAutoresizingMaskIntoConstraints="NO" id="WFa-d3-zcU"> |
||||
<rect key="frame" x="0.0" y="1610" width="1784" height="40"/> |
||||
<subviews> |
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="aSt-Fm-PHF" customClass="Label" customModule="TournamentStats" customModuleProvider="target"> |
||||
<rect key="frame" x="0.0" y="0.0" width="892" height="40"/> |
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/> |
||||
<nil key="textColor"/> |
||||
<nil key="highlightedColor"/> |
||||
</label> |
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="wcd-nU-zRB" customClass="Label" customModule="TournamentStats" customModuleProvider="target"> |
||||
<rect key="frame" x="892" y="0.0" width="892" height="40"/> |
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/> |
||||
<nil key="textColor"/> |
||||
<nil key="highlightedColor"/> |
||||
</label> |
||||
</subviews> |
||||
<constraints> |
||||
<constraint firstAttribute="height" constant="40" id="nBc-2w-1Ft"/> |
||||
</constraints> |
||||
</stackView> |
||||
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" spacing="16" translatesAutoresizingMaskIntoConstraints="NO" id="9WN-7G-oBN"> |
||||
<rect key="frame" x="0.0" y="1660" width="1784" height="500"/> |
||||
<subviews> |
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="YMb-PS-dFz"> |
||||
<rect key="frame" x="0.0" y="0.0" width="884" height="500"/> |
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
||||
</view> |
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="LJL-hy-odj"> |
||||
<rect key="frame" x="900" y="0.0" width="884" height="500"/> |
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
||||
</view> |
||||
</subviews> |
||||
<constraints> |
||||
<constraint firstAttribute="height" constant="500" id="TTR-HJ-gPu"/> |
||||
</constraints> |
||||
</stackView> |
||||
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillProportionally" translatesAutoresizingMaskIntoConstraints="NO" id="myS-g5-vsP"> |
||||
<rect key="frame" x="0.0" y="2170" width="1784" height="50"/> |
||||
<subviews> |
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="mDV-nN-W7V" customClass="Label" customModule="TournamentStats" customModuleProvider="target"> |
||||
<rect key="frame" x="0.0" y="0.0" width="892" height="50"/> |
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/> |
||||
<nil key="textColor"/> |
||||
<nil key="highlightedColor"/> |
||||
</label> |
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="7xF-BM-RBb" customClass="Label" customModule="TournamentStats" customModuleProvider="target"> |
||||
<rect key="frame" x="892" y="0.0" width="892" height="50"/> |
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/> |
||||
<nil key="textColor"/> |
||||
<nil key="highlightedColor"/> |
||||
</label> |
||||
</subviews> |
||||
<constraints> |
||||
<constraint firstAttribute="height" constant="50" id="d8p-7J-A5m"/> |
||||
</constraints> |
||||
</stackView> |
||||
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" spacing="16" translatesAutoresizingMaskIntoConstraints="NO" id="2iy-YX-agg"> |
||||
<rect key="frame" x="0.0" y="2230" width="1784" height="400"/> |
||||
<subviews> |
||||
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="grouped" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" sectionFooterHeight="18" translatesAutoresizingMaskIntoConstraints="NO" id="vqG-Pt-IB2" customClass="TableView" customModule="TournamentStats" customModuleProvider="target"> |
||||
<rect key="frame" x="0.0" y="0.0" width="884" height="400"/> |
||||
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/> |
||||
</tableView> |
||||
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="grouped" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" sectionFooterHeight="18" translatesAutoresizingMaskIntoConstraints="NO" id="bPn-x2-2H0" customClass="TableView" customModule="TournamentStats" customModuleProvider="target"> |
||||
<rect key="frame" x="900" y="0.0" width="884" height="400"/> |
||||
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/> |
||||
</tableView> |
||||
</subviews> |
||||
<constraints> |
||||
<constraint firstAttribute="height" constant="400" id="U4b-yO-LB0"/> |
||||
</constraints> |
||||
</stackView> |
||||
</subviews> |
||||
</stackView> |
||||
</subviews> |
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
||||
<constraints> |
||||
<constraint firstItem="vUN-kp-3ea" firstAttribute="trailing" secondItem="w79-xx-Evx" secondAttribute="trailing" constant="8" id="4VD-EL-9RH"/> |
||||
<constraint firstItem="w79-xx-Evx" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" constant="8" id="stc-gy-e36"/> |
||||
<constraint firstItem="w79-xx-Evx" firstAttribute="top" secondItem="vUN-kp-3ea" secondAttribute="top" id="usO-r7-R25"/> |
||||
</constraints> |
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/> |
||||
<viewLayoutGuide key="safeArea" id="vUN-kp-3ea"/> |
||||
<connections> |
||||
<outlet property="container21" destination="Zmk-PV-di2" id="mv0-Sg-r5V"/> |
||||
<outlet property="container22" destination="iQu-2n-Y3T" id="Yhg-KD-vzU"/> |
||||
<outlet property="container23" destination="OZT-Lo-t7S" id="QcZ-kf-CTr"/> |
||||
<outlet property="container41" destination="YMb-PS-dFz" id="siA-pY-GZT"/> |
||||
<outlet property="container42" destination="LJL-hy-odj" id="7Bq-4v-uda"/> |
||||
<outlet property="hStack1a" destination="aDf-a7-TD5" id="8fs-h9-pfk"/> |
||||
<outlet property="hStack1b" destination="ABP-ce-MDa" id="44B-nQ-AOq"/> |
||||
<outlet property="hStack2a" destination="91U-hc-Oqn" id="5b4-H7-FU3"/> |
||||
<outlet property="hStack2b" destination="4u9-3E-Qwu" id="14V-Za-4Iz"/> |
||||
<outlet property="hStack3a" destination="RgJ-XU-xav" id="PLX-zh-AiD"/> |
||||
<outlet property="hStack3b" destination="ucv-f0-P2r" id="u9R-aG-IpP"/> |
||||
<outlet property="hStack4a" destination="WFa-d3-zcU" id="i8z-Cc-rbi"/> |
||||
<outlet property="hStack4b" destination="9WN-7G-oBN" id="eAg-zC-ojV"/> |
||||
<outlet property="hStack5a" destination="myS-g5-vsP" id="S4L-12-8qP"/> |
||||
<outlet property="hStack5b" destination="2iy-YX-agg" id="iqW-bN-4fc"/> |
||||
<outlet property="infographyTitle" destination="4Hu-Ou-nFd" id="0vL-nP-fjY"/> |
||||
<outlet property="label11" destination="Hf2-oh-1Oz" id="njE-6s-1Qr"/> |
||||
<outlet property="label12" destination="US0-bW-Fa3" id="XVf-Ak-Mi2"/> |
||||
<outlet property="label13" destination="7a3-eu-I7F" id="Zhy-aY-QPM"/> |
||||
<outlet property="label21" destination="Hcr-dr-rUz" id="Ggb-ck-2Y7"/> |
||||
<outlet property="label22" destination="2yf-Z5-Tpy" id="5yK-A5-sha"/> |
||||
<outlet property="label23" destination="hcG-kJ-HS1" id="iKw-Dy-B6C"/> |
||||
<outlet property="label31" destination="zHz-52-q8s" id="twI-GF-8Zj"/> |
||||
<outlet property="label32" destination="PFl-bw-SwB" id="OhY-3p-Bei"/> |
||||
<outlet property="label41" destination="aSt-Fm-PHF" id="43C-8N-8Xk"/> |
||||
<outlet property="label42" destination="wcd-nU-zRB" id="WAR-I1-Bej"/> |
||||
<outlet property="label51" destination="mDV-nN-W7V" id="QlS-da-9bL"/> |
||||
<outlet property="tableView11" destination="HbR-TC-HeD" id="P5k-OS-JgN"/> |
||||
<outlet property="tableView12" destination="AOY-yE-egI" id="XYu-ad-tdK"/> |
||||
<outlet property="tableView13" destination="D9l-DT-eiv" id="yUh-4y-qns"/> |
||||
<outlet property="tableView31" destination="0h6-mp-rHD" id="Huj-wS-RGv"/> |
||||
<outlet property="tableView32" destination="WPJ-0S-klg" id="PzI-hh-uer"/> |
||||
<outlet property="tableView51" destination="vqG-Pt-IB2" id="FrK-oS-xF8"/> |
||||
</connections> |
||||
<point key="canvasLocation" x="142" y="-180"/> |
||||
</view> |
||||
</objects> |
||||
</document> |
||||
@ -0,0 +1,192 @@ |
||||
// |
||||
// InfographyView.swift |
||||
// TournamentStats |
||||
// |
||||
// Created by Laurent Morvillier on 05/08/2019. |
||||
// Copyright © 2019 Stax River. All rights reserved. |
||||
// |
||||
|
||||
import Foundation |
||||
import UIKit |
||||
import Charts |
||||
|
||||
class InfographyViewController : UIViewController { |
||||
|
||||
var generator: ReportGenerator? |
||||
|
||||
override func viewDidLayoutSubviews() { |
||||
|
||||
super.viewDidLayoutSubviews() |
||||
|
||||
let gradient: CAGradientLayer = CAGradientLayer() |
||||
|
||||
let startColor = UIColor(red: 23/255, green: 72/255, blue: 61/255, alpha: 1) |
||||
let endColor = UIColor(red: 47/255, green: 149/255, blue: 126/255, alpha: 1) |
||||
|
||||
gradient.colors = [startColor.cgColor, endColor.cgColor] |
||||
gradient.locations = [0.2 , 1.0] |
||||
gradient.startPoint = CGPoint(x: 0.0, y: 0.0) |
||||
gradient.endPoint = CGPoint(x: 1.0, y: 1.0) |
||||
gradient.frame = self.view.bounds |
||||
|
||||
self.view.layer.insertSublayer(gradient, at: 0) |
||||
|
||||
} |
||||
|
||||
override func viewDidLoad() { |
||||
|
||||
let totalWidth: CGFloat = 1500.0 |
||||
let defaultSpacing: CGFloat = 8.0 |
||||
|
||||
guard let generator = self.generator else { |
||||
return |
||||
} |
||||
|
||||
let mainTitle = UILabel() |
||||
mainTitle.textColor = UIColor.white |
||||
mainTitle.font = UIFont.boldSystemFont(ofSize: 64.0) |
||||
mainTitle.textAlignment = .center |
||||
mainTitle.text = "2019 WSOP" |
||||
|
||||
// let table1 = TableView(data: generator.biggestWinners, frame: CGRect.zero, style: .grouped) |
||||
// table1.defineConstraints(width: 500 - defaultSpacing / 3, height: 500) |
||||
// |
||||
// let table2 = TableView(data: generator.mostWins, frame: CGRect.zero, style: .grouped) |
||||
// table2.defineConstraints(width: 500 - defaultSpacing / 3, height: 500) |
||||
// |
||||
// let table3 = TableView(data: generator.averageCash, frame: CGRect.zero, style: .grouped) |
||||
// table3.defineConstraints(width: 500 - defaultSpacing / 3, height: 500) |
||||
// |
||||
// let hstack1: UIStackView = UIStackView(arrangedSubviews: [table1, table2, table3]) |
||||
// hstack1.defineConstraints(width: totalWidth, height: 300.0) |
||||
// hstack1.distribution = .equalSpacing |
||||
// hstack1.spacing = 8.0 |
||||
// hstack1.axis = .horizontal |
||||
// hstack1.alignment = .top |
||||
// |
||||
// ///// |
||||
// |
||||
// let title1 = TitleLabel(frame: CGRect.zero, text: "Buy-in distribution") |
||||
// let title2 = TitleLabel(frame: CGRect.zero, text: "First prizes distribution") |
||||
// let title3 = TitleLabel(frame: CGRect.zero, text: "Prizepool distribution") |
||||
// |
||||
// let hstack2a: UIStackView = UIStackView(arrangedSubviews: [title1, title2, title3]) |
||||
// hstack2a.defineConstraints(width: totalWidth) |
||||
// hstack2a.distribution = .fillEqually |
||||
// hstack2a.axis = .horizontal |
||||
// hstack2a.alignment = .top |
||||
// |
||||
// ///// |
||||
// |
||||
// let buyinDistribPie = PieChart(frame: CGRect.zero) |
||||
// buyinDistribPie.data = generator.tournamentBuyinDistribution.pieChartData |
||||
// buyinDistribPie.defineConstraints(height: 300) |
||||
// buyinDistribPie.notifyDataSetChanged() |
||||
// |
||||
// let firstPrizeDistributionPie = PieChart(frame: CGRect.zero) |
||||
// firstPrizeDistributionPie.data = generator.firstPrizeDistribution.pieChartData |
||||
// firstPrizeDistributionPie.defineConstraints(height: 300) |
||||
// |
||||
// let prizepoolDistribPie = PieChart(frame: CGRect.zero) |
||||
// prizepoolDistribPie.data = generator.tournamentPrizepoolDistribution.pieChartData |
||||
// prizepoolDistribPie.defineConstraints(height: 400) |
||||
// |
||||
// let hstack2: UIStackView = UIStackView(arrangedSubviews: [buyinDistribPie, firstPrizeDistributionPie, prizepoolDistribPie]) |
||||
// hstack2.defineConstraints(width: totalWidth, height: 350.0) |
||||
// hstack2.distribution = .fillEqually |
||||
// hstack2.axis = .horizontal |
||||
// hstack2.alignment = .top |
||||
// |
||||
// |
||||
// ///// |
||||
// |
||||
// let title31 = TitleLabel(frame: CGRect.zero, text: "Events by prizepool") |
||||
// let title32 = TitleLabel(frame: CGRect.zero, text: "Events by entries") |
||||
// |
||||
// let hstack3a: UIStackView = UIStackView(arrangedSubviews: [title31, title32]) |
||||
// hstack3a.defineConstraints(width: totalWidth) |
||||
// hstack3a.distribution = .fillEqually |
||||
// hstack3a.axis = .horizontal |
||||
// hstack3a.alignment = .top |
||||
// |
||||
// ///// |
||||
// |
||||
// let table31 = TableView(data: generator.tourniesByPrizepool, frame: CGRect.zero, style: .grouped) |
||||
// table31.defineConstraints(width: 750, height: 500) |
||||
// |
||||
// let table32 = TableView(data: generator.tourniesByEntries, frame: CGRect.zero, style: .grouped) |
||||
// table32.defineConstraints(width: 750, height: 500) |
||||
// |
||||
// let hstack3: UIStackView = UIStackView(arrangedSubviews: [table31, table32]) |
||||
// hstack3.defineConstraints(width: totalWidth, height: 300.0) |
||||
// hstack3.distribution = .equalSpacing |
||||
// hstack3.spacing = 8.0 |
||||
// hstack3.axis = .horizontal |
||||
// hstack3.alignment = .top |
||||
|
||||
///// |
||||
|
||||
let vstack: UIStackView = UIStackView(arrangedSubviews: [mainTitle]) |
||||
// let vstack: UIStackView = UIStackView(arrangedSubviews: [mainTitle, hstack1, hstack2a, hstack2, hstack3a, hstack3]) |
||||
vstack.axis = .vertical |
||||
vstack.distribution = .equalCentering |
||||
vstack.alignment = .center |
||||
vstack.spacing = 10.0 |
||||
self.view.addSubview(vstack) |
||||
|
||||
vstack.translatesAutoresizingMaskIntoConstraints = false |
||||
vstack.leadingAnchor.constraint(equalTo: self.view.leadingAnchor, constant: 16.0).isActive = true |
||||
vstack.trailingAnchor.constraint(equalTo: self.view.trailingAnchor, constant: -16.0).isActive = true |
||||
vstack.topAnchor.constraint(equalTo: self.view.safeAreaLayoutGuide.topAnchor, constant: 16.0).isActive = true |
||||
|
||||
} |
||||
|
||||
} |
||||
|
||||
//class InfographyView : UIView { |
||||
// |
||||
// var references: [UITableViewDataSource] = [] |
||||
// |
||||
// init(frame: CGRect, generator: ReportGenerator) { |
||||
// super.init(frame: frame) |
||||
// self.backgroundColor = UIColor.lightGray |
||||
// |
||||
// let table1 = TableView(data: generator.biggestWinners, frame: CGRect.zero, style: .grouped) |
||||
// table1.defineConstraints(width: 500, height: 500) |
||||
// |
||||
// let table2 = TableView(data: generator.mostWins, frame: CGRect.zero, style: .grouped) |
||||
// table2.defineConstraints(width: 500, height: 500) |
||||
// |
||||
// let pieChart = PieChartView(frame: CGRect.zero) |
||||
// pieChart.data = generator.tournamentBuyinDistribution.pieChartData |
||||
// pieChart.defineConstraints(width: 300, height: 300) |
||||
// |
||||
// let hstack1: UIStackView = UIStackView(arrangedSubviews: [table1, table2]) |
||||
// hstack1.defineConstraints(width: 1000, height: 500) |
||||
// hstack1.distribution = .fill |
||||
// hstack1.axis = .horizontal |
||||
// hstack1.alignment = .top |
||||
// hstack1.backgroundColor = UIColor.red |
||||
// |
||||
// let hstack2: UIStackView = UIStackView(arrangedSubviews: [pieChart]) |
||||
// hstack2.defineConstraints(width: 1000, height: 300) |
||||
// hstack2.distribution = .fill |
||||
// hstack2.axis = .horizontal |
||||
// hstack2.alignment = .top |
||||
// hstack2.backgroundColor = UIColor.green |
||||
// |
||||
// let vstack: UIStackView = UIStackView(arrangedSubviews: [hstack1, hstack2]) |
||||
// vstack.axis = .vertical |
||||
// vstack.distribution = .fill |
||||
// vstack.alignment = .leading |
||||
// vstack.backgroundColor = UIColor.blue |
||||
// self.addSubview(vstack) |
||||
// self.addMaxConstraints(view: vstack) |
||||
// |
||||
// } |
||||
// |
||||
// required init?(coder aDecoder: NSCoder) { |
||||
// fatalError("init(coder:) has not been implemented") |
||||
// } |
||||
// |
||||
//} |
||||
Loading…
Reference in new issue