Added boat classes and floating action button

This commit is contained in:
Raimund Wege
2017-08-22 15:01:58 +02:00
parent afe9a531d3
commit e65d350444
7 changed files with 315 additions and 30 deletions
@@ -333,6 +333,7 @@
C867BD0B1F4B0290007E78E0 /* CreateTrainingViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C867BD0A1F4B0290007E78E0 /* CreateTrainingViewController.swift */; };
C867BD0D1F4B0A0E007E78E0 /* RegattaCoreDataManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = C867BD0C1F4B0A0E007E78E0 /* RegattaCoreDataManager.swift */; };
C867BD0F1F4B0A4B007E78E0 /* TrainingCoreDataManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = C867BD0E1F4B0A4B007E78E0 /* TrainingCoreDataManager.swift */; };
C867BD111F4C44E5007E78E0 /* TrainingTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C867BD101F4C44E5007E78E0 /* TrainingTableViewController.swift */; };
C8739E061D2AA2A500A89F3C /* GPSFix+CoreDataProperties.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8739DFC1D2AA2A500A89F3C /* GPSFix+CoreDataProperties.swift */; };
C8739E071D2AA2A500A89F3C /* GPSFix.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8739DFD1D2AA2A500A89F3C /* GPSFix.swift */; };
C8739E081D2AA2A500A89F3C /* Leaderboard+CoreDataProperties.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8739DFE1D2AA2A500A89F3C /* Leaderboard+CoreDataProperties.swift */; };
@@ -731,6 +732,7 @@
C867BD0A1F4B0290007E78E0 /* CreateTrainingViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CreateTrainingViewController.swift; sourceTree = "<group>"; };
C867BD0C1F4B0A0E007E78E0 /* RegattaCoreDataManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RegattaCoreDataManager.swift; sourceTree = "<group>"; };
C867BD0E1F4B0A4B007E78E0 /* TrainingCoreDataManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TrainingCoreDataManager.swift; sourceTree = "<group>"; };
C867BD101F4C44E5007E78E0 /* TrainingTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TrainingTableViewController.swift; sourceTree = "<group>"; };
C8739D9A1D25317100A89F3C /* CoreData 2.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "CoreData 2.xcdatamodel"; sourceTree = "<group>"; };
C8739DFC1D2AA2A500A89F3C /* GPSFix+CoreDataProperties.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "GPSFix+CoreDataProperties.swift"; sourceTree = "<group>"; };
C8739DFD1D2AA2A500A89F3C /* GPSFix.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GPSFix.swift; sourceTree = "<group>"; };
@@ -1289,6 +1291,7 @@
children = (
C867BD081F4B0274007E78E0 /* TrainingViewController.swift */,
C867BD0A1F4B0290007E78E0 /* CreateTrainingViewController.swift */,
C867BD101F4C44E5007E78E0 /* TrainingTableViewController.swift */,
);
name = Training;
sourceTree = "<group>";
@@ -1967,6 +1970,7 @@
7FD9D3031A1236080058FEAD /* Extensions.swift in Sources */,
C8739E091D2AA2A500A89F3C /* Leaderboard.swift in Sources */,
C8B3B9BC1F39E64400B3B6BA /* Keychain.swift in Sources */,
C867BD111F4C44E5007E78E0 /* TrainingTableViewController.swift in Sources */,
C8739E141D2BF16300A89F3C /* LeaderboardData.swift in Sources */,
C89C5FC51D06A289002AAAD2 /* GradientView.swift in Sources */,
C8F71EEF1D8691F700826DE4 /* UIRefreshControl+AFNetworking.m in Sources */,
@@ -51,3 +51,117 @@ struct Images {
static let Red = UIImage(color: Colors.Red)
static let RedHighlighted = UIImage(color: Colors.RedHighlighted)
}
let BoatClasses = [
"18Footer",
"2.4 Meter",
"12 Meter",
"29er",
"49er",
"49erFX",
"420",
"470",
"5O5",
"5.5mR",
"8mR",
"A-Catamaran",
"Albin Express",
"Albin Ballad",
"B/ONE",
"Cadet",
"International Canoe",
"Canoe Taifun",
"Contender",
"C&C 30",
"D-One",
"Dragon Int.",
"Delphia 24",
"Dyas",
"Extreme 40",
"D35",
"Elliott 6m",
"Europe Int.",
"Formula 18",
"Farr 30",
"Farr 280",
"Finn",
"Flying Dutchman",
"Flying Phantom",
"Folkboat",
"FUN",
"Formula 16",
"GC 32",
"GP 26",
"Hobie 16",
"H-Boat",
"Hansa 303",
"Hobie Tiger",
"Hobie Wild Cat",
"International 14",
"J/22",
"J/24",
"J/70",
"J/80",
"J/88",
"J/105",
"J/111",
"Kielzugvogel",
"Kite",
"Laser 2",
"Laser 4.7",
"Laser Radial",
"Laser Int.",
"Laser SB3",
"Lago 26",
"Longtze",
"M32",
"Melges 20",
"Melges 24",
"Mini Transat 6.50",
"Musto Skiff",
"Nacra 15",
"Nacra 17",
"Nacra 17 Foiling",
"O-Jolle",
"OK Dinghy",
"O'pen BIC",
"Optimist",
"Pirate",
"Platu 25",
"PWA",
"RC44",
"RS 100",
"RS 200",
"RS 400",
"RS 500",
"RS 800",
"RS Aero",
"RS:X",
"RS Feva",
"SKUD 18",
"Sonar",
"Soling",
"Splash Blue",
"Splash Red",
"Splash Green",
"Star",
"Streamline",
"Sunbeam 22",
"Swan 45",
"Tartan 10",
"Techno 293",
"Techno 293 Plus",
"Teeny",
"Tornado Catamaran",
"Tom 28 MAX",
"Trias",
"Viper 640",
"VO60",
"VX ONE",
"Weta",
"X-99",
"ORC",
"ORC Club",
"ORC International",
"PHRF"
].sorted { $0 < $1 }
@@ -12,6 +12,52 @@ class CreateTrainingViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
setup()
}
// Setup
fileprivate func setup() {
setupLocalization()
setupNavigationBar()
}
fileprivate func setupLocalization() {
navigationItem.title = "TRAININGS TITLE"
}
fileprivate func setupNavigationBar() {
navigationItem.leftBarButtonItem = UIBarButtonItem(customView: UIImageView(image: UIImage(named: "sap_logo")))
}
// Actions
@IBAction func cancelButtonTapped(_ sender: Any) {
presentingViewController?.dismiss(animated: true)
}
}
// MARK: - UIPickerViewDataSource
extension CreateTrainingViewController: UIPickerViewDataSource {
func numberOfComponents(in pickerView: UIPickerView) -> Int {
return 1
}
func pickerView(_ pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int {
return BoatClasses.count
}
}
// MARK: - UIPickerViewDelegate
extension CreateTrainingViewController: UIPickerViewDelegate {
func pickerView(_ pickerView: UIPickerView, titleForRow row: Int, forComponent component: Int) -> String? {
return BoatClasses[row]
}
}
@@ -71,3 +71,25 @@ extension UITableViewCell {
}
}
// MARK: - UIViewController
extension UIViewController {
func makeViewRoundWithShadow(_ view: UIView) {
// Corner radius
view.layer.cornerRadius = view.frame.height / 2
// Border
view.layer.borderWidth = 1.0
view.layer.borderColor = UIColor.black.cgColor
// Shadow
view.layer.shadowColor = UIColor.black.cgColor
view.layer.shadowOffset = CGSize(width: 3, height: 3)
view.layer.shadowOpacity = 0.2
view.layer.shadowRadius = 4.0
}
}
@@ -57,7 +57,6 @@ class HomeViewController: UIViewController {
fileprivate func setup() {
setupButtons()
setupLocalization()
setupNavigationBar()
setupTableView()
setupTableViewDataSource()
setupTableViewHeader()
@@ -69,6 +68,7 @@ class HomeViewController: UIViewController {
}
fileprivate func setupLocalization() {
navigationItem.title = "REGATTAS TITLE"
headerTitleLabel.text = Translation.HomeView.HeaderTitleLabel.Text.String
scanCodeButton.setTitle(Translation.ScanView.Title.String, for: .normal)
noCodeButton.setTitle(Translation.HomeView.NoCodeAlert.Title.String, for: .normal)
@@ -76,10 +76,6 @@ class HomeViewController: UIViewController {
footerTextView.text = Translation.HomeView.FooterTextView.Text.String
}
fileprivate func setupNavigationBar() {
navigationItem.title = "REGATTAS TITLE"
}
fileprivate func setupTableView() {
tableView.rowHeight = UITableViewAutomaticDimension
tableView.estimatedRowHeight = 140
@@ -387,7 +387,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Pmf-c9-OVe">
<rect key="frame" x="16" y="8" width="343" height="289.5"/>
<rect key="frame" x="16" y="16" width="343" height="281.5"/>
<color key="backgroundColor" red="0.0" green="0.61568627450980395" blue="0.8784313725490196" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<fontDescription key="fontDescription" name="OpenSans" family="Open Sans" pointSize="21"/>
<state key="normal" title="Regatta Button">
@@ -404,7 +404,7 @@
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="TBi-yV-KGH">
<rect key="frame" x="16" y="305.5" width="343" height="289.5"/>
<rect key="frame" x="16" y="305.5" width="343" height="281.5"/>
<color key="backgroundColor" red="0.0" green="0.61568627450980395" blue="0.8784313725490196" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<fontDescription key="fontDescription" name="OpenSans" family="Open Sans" pointSize="21"/>
<state key="normal" title="Training Button">
@@ -424,11 +424,11 @@
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="Pmf-c9-OVe" firstAttribute="top" secondItem="8M8-ol-4ku" secondAttribute="bottom" constant="8" id="7Dk-Sx-VTv"/>
<constraint firstItem="Pmf-c9-OVe" firstAttribute="top" secondItem="8M8-ol-4ku" secondAttribute="bottom" constant="16" id="7Dk-Sx-VTv"/>
<constraint firstAttribute="trailing" secondItem="Pmf-c9-OVe" secondAttribute="trailing" constant="16" id="Kze-kc-Xzh"/>
<constraint firstItem="TBi-yV-KGH" firstAttribute="width" secondItem="Pmf-c9-OVe" secondAttribute="width" id="XnE-OM-vq4"/>
<constraint firstItem="TBi-yV-KGH" firstAttribute="top" secondItem="Pmf-c9-OVe" secondAttribute="bottom" constant="8" id="jx9-oP-Cg7"/>
<constraint firstItem="RbV-Vw-aEx" firstAttribute="top" secondItem="TBi-yV-KGH" secondAttribute="bottom" constant="8" id="mFL-wx-fu8"/>
<constraint firstItem="RbV-Vw-aEx" firstAttribute="top" secondItem="TBi-yV-KGH" secondAttribute="bottom" constant="16" id="mFL-wx-fu8"/>
<constraint firstItem="Pmf-c9-OVe" firstAttribute="leading" secondItem="UH5-OA-vu5" secondAttribute="leading" constant="16" id="sb9-XI-yDY"/>
<constraint firstItem="TBi-yV-KGH" firstAttribute="centerX" secondItem="Pmf-c9-OVe" secondAttribute="centerX" id="tqB-PK-4Jm"/>
<constraint firstItem="TBi-yV-KGH" firstAttribute="height" secondItem="Pmf-c9-OVe" secondAttribute="height" id="zFl-ch-sq3"/>
@@ -448,6 +448,22 @@
</objects>
<point key="canvasLocation" x="410" y="-307"/>
</scene>
<!--Navigation Controller-->
<scene sceneID="6Ty-cK-spl">
<objects>
<navigationController id="Pn3-0n-ZdQ" sceneMemberID="viewController">
<navigationBar key="navigationBar" contentMode="scaleToFill" misplaced="YES" translucent="NO" id="McN-2f-sK6">
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
<connections>
<segue destination="RRc-Lh-2o4" kind="relationship" relationship="rootViewController" id="563-CO-bNv"/>
</connections>
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Lo3-i9-FWc" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1977" y="-2507"/>
</scene>
<!--Create Training View Controller-->
<scene sceneID="zai-sg-LQl">
<objects>
@@ -469,7 +485,7 @@
</constraint>
</constraints>
<fontDescription key="fontDescription" name="OpenSans" family="Open Sans" pointSize="21"/>
<state key="normal" title="Start Training Button">
<state key="normal" title="Create Training Button">
<color key="titleColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<userDefinedRuntimeAttributes>
@@ -497,6 +513,10 @@
<constraints>
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="100" id="INg-vK-nnm"/>
</constraints>
<connections>
<outlet property="dataSource" destination="RRc-Lh-2o4" id="t6o-Je-VU4"/>
<outlet property="delegate" destination="RRc-Lh-2o4" id="Q8I-TO-XUL"/>
</connections>
</pickerView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
@@ -519,11 +539,17 @@
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</view>
<navigationItem key="navigationItem" id="dR9-8n-GwO"/>
<navigationItem key="navigationItem" id="dR9-8n-GwO">
<barButtonItem key="rightBarButtonItem" systemItem="cancel" id="8dp-ku-NGq">
<connections>
<action selector="cancelButtonTapped:" destination="RRc-Lh-2o4" id="ulL-xi-iBi"/>
</connections>
</barButtonItem>
</navigationItem>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="kAU-Am-SqM" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1976.8" y="-2507.4962518740631"/>
<point key="canvasLocation" x="2737" y="-2507"/>
</scene>
<!--Training View Controller-->
<scene sceneID="Zlq-oI-kok">
@@ -608,10 +634,10 @@
</objects>
<point key="canvasLocation" x="1977" y="-1808"/>
</scene>
<!--View Controller-->
<!--Training Table View Controller-->
<scene sceneID="EFQ-Uc-xDt">
<objects>
<viewController id="1ba-kX-Lnq" sceneMemberID="viewController">
<viewController id="1ba-kX-Lnq" customClass="TrainingTableViewController" customModule="SAPTracker" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="Rgw-kx-qOy"/>
<viewControllerLayoutGuide type="bottom" id="d4m-uX-YSN"/>
@@ -723,6 +749,10 @@
</connections>
</tableViewCell>
</prototypes>
<connections>
<outlet property="dataSource" destination="1ba-kX-Lnq" id="NgU-Db-CGc"/>
<outlet property="delegate" destination="1ba-kX-Lnq" id="tzb-J5-AOZ"/>
</connections>
</tableView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Pwd-JR-SVL">
<rect key="frame" x="291" y="519" width="64" height="64"/>
@@ -736,7 +766,7 @@
<color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</state>
<connections>
<segue destination="RRc-Lh-2o4" kind="show" id="2Wa-Il-Qt2"/>
<segue destination="Pn3-0n-ZdQ" kind="presentation" id="Kqa-dt-WR3"/>
</connections>
</button>
</subviews>
@@ -754,6 +784,12 @@
<constraint firstItem="d4m-uX-YSN" firstAttribute="top" secondItem="Pwd-JR-SVL" secondAttribute="bottom" constant="20" id="q0p-hA-kVh"/>
</constraints>
</view>
<connections>
<outlet property="addButton" destination="Pwd-JR-SVL" id="oQ2-6e-NCD"/>
<outlet property="footerTextView" destination="AW1-r0-JWj" id="BoM-tz-fRo"/>
<outlet property="headerTitleLabel" destination="bx9-EY-ljk" id="91C-Q7-cME"/>
<outlet property="tableView" destination="bav-TA-AP5" id="MUP-iZ-LeY"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="1Kb-cO-cLT" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
@@ -795,7 +831,7 @@
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Mark Name Label" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" minimumFontSize="12" adjustsLetterSpacingToFitWidth="YES" preferredMaxLayoutWidth="0.0" translatesAutoresizingMaskIntoConstraints="NO" id="BQe-Id-ec3">
<rect key="frame" x="101" y="290.5" width="173" height="22"/>
<rect key="frame" x="101.5" y="290.5" width="173" height="22"/>
<constraints>
<constraint firstAttribute="height" constant="22" id="g3A-7J-yFy"/>
</constraints>
@@ -1001,7 +1037,7 @@
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="6rV-hv-c3D" userLabel="Countdown View">
<rect key="frame" x="6" y="38" width="363" height="50"/>
<rect key="frame" x="6.5" y="38" width="363" height="50"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="pjH-rV-MGI" userLabel="Days View">
<rect key="frame" x="0.0" y="0.0" width="121" height="50"/>
@@ -1416,13 +1452,13 @@
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Status Title Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" preferredMaxLayoutWidth="0.0" translatesAutoresizingMaskIntoConstraints="NO" id="r6d-OU-cRI">
<rect key="frame" x="20" y="14.5" width="134.5" height="23.5"/>
<rect key="frame" x="20" y="14" width="134.5" height="23.5"/>
<fontDescription key="fontDescription" name="OpenSans" family="Open Sans" pointSize="17"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Status Label" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" preferredMaxLayoutWidth="0.0" translatesAutoresizingMaskIntoConstraints="NO" id="5Xu-6g-tqP">
<rect key="frame" x="259" y="14.5" width="96" height="23.5"/>
<rect key="frame" x="259" y="14" width="96" height="23.5"/>
<fontDescription key="fontDescription" name="OpenSans" family="Open Sans" pointSize="17"/>
<nil key="highlightedColor"/>
</label>
@@ -1448,13 +1484,13 @@
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Mode Title Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" preferredMaxLayoutWidth="0.0" translatesAutoresizingMaskIntoConstraints="NO" id="Xww-rc-pOA">
<rect key="frame" x="20" y="14.5" width="130.5" height="23.5"/>
<rect key="frame" x="20" y="14" width="130.5" height="23.5"/>
<fontDescription key="fontDescription" name="OpenSans" family="Open Sans" pointSize="17"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Mode Label" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" preferredMaxLayoutWidth="0.0" translatesAutoresizingMaskIntoConstraints="NO" id="tJY-RR-vpe">
<rect key="frame" x="262" y="14.5" width="93" height="23.5"/>
<rect key="frame" x="262" y="14" width="93" height="23.5"/>
<fontDescription key="fontDescription" name="OpenSans" family="Open Sans" pointSize="17"/>
<nil key="highlightedColor"/>
</label>
@@ -1480,13 +1516,13 @@
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="GPS Fixes Title Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" preferredMaxLayoutWidth="0.0" translatesAutoresizingMaskIntoConstraints="NO" id="Ujw-jg-ilY">
<rect key="frame" x="20" y="14.5" width="161" height="23.5"/>
<rect key="frame" x="20" y="14" width="161" height="23.5"/>
<fontDescription key="fontDescription" name="OpenSans" family="Open Sans" pointSize="17"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="GPS Fixes Label" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" preferredMaxLayoutWidth="0.0" translatesAutoresizingMaskIntoConstraints="NO" id="dz3-w7-CCh">
<rect key="frame" x="232" y="14.5" width="123" height="23.5"/>
<rect key="frame" x="232" y="14" width="123" height="23.5"/>
<fontDescription key="fontDescription" name="OpenSans" family="Open Sans" pointSize="17"/>
<nil key="highlightedColor"/>
</label>
@@ -1512,13 +1548,13 @@
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="GPS Accuracy Title Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" preferredMaxLayoutWidth="0.0" translatesAutoresizingMaskIntoConstraints="NO" id="Z1d-5I-pbj">
<rect key="frame" x="20" y="14.5" width="191.5" height="23.5"/>
<rect key="frame" x="20" y="14" width="191.5" height="23.5"/>
<fontDescription key="fontDescription" name="OpenSans" family="Open Sans" pointSize="17"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="GPS Accuracy Label" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="DiM-MR-SGV">
<rect key="frame" x="181.5" y="14.5" width="153.5" height="23.5"/>
<rect key="frame" x="181.5" y="14" width="153.5" height="23.5"/>
<fontDescription key="fontDescription" name="OpenSans" family="Open Sans" pointSize="17"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
@@ -1630,7 +1666,7 @@
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Value Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="48" preferredMaxLayoutWidth="0.0" translatesAutoresizingMaskIntoConstraints="NO" id="mUm-EE-6Is" userLabel="Time Label">
<rect key="frame" x="3" y="244" width="369" height="98.5"/>
<rect key="frame" x="3" y="243.5" width="369" height="98.5"/>
<fontDescription key="fontDescription" name="OpenSans-Light" family="Open Sans" pointSize="72"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
@@ -1672,7 +1708,7 @@
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Value Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="l5u-i3-029">
<rect key="frame" x="3" y="244" width="369" height="98.5"/>
<rect key="frame" x="3" y="243.5" width="369" height="98.5"/>
<fontDescription key="fontDescription" name="OpenSans-Light" family="Open Sans" pointSize="72"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
@@ -1713,7 +1749,7 @@
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Value Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="sGK-xV-9a0">
<rect key="frame" x="3" y="244" width="369" height="98.5"/>
<rect key="frame" x="3" y="243.5" width="369" height="98.5"/>
<fontDescription key="fontDescription" name="OpenSans-Light" family="Open Sans" pointSize="72"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
@@ -2189,8 +2225,8 @@
<image name="settings" width="22" height="22"/>
</resources>
<inferredMetricsTieBreakers>
<segue reference="tzB-PL-31j"/>
<segue reference="Irs-ey-Uhs"/>
<segue reference="Xxn-jp-xEB"/>
<segue reference="QMa-LQ-D8c"/>
<segue reference="fgS-yf-c3u"/>
</inferredMetricsTieBreakers>
<color key="tintColor" red="0.0" green="0.61568627450980395" blue="0.8784313725490196" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
@@ -0,0 +1,67 @@
//
// TrainingTableViewController.swift
// SAPTracker
//
// Created by Raimund Wege on 22.08.17.
// Copyright © 2017 com.sap.sailing. All rights reserved.
//
import UIKit
class TrainingTableViewController: UIViewController {
@IBOutlet weak var headerTitleLabel: UILabel!
@IBOutlet weak var tableView: UITableView!
@IBOutlet weak var footerTextView: UITextView!
@IBOutlet weak var addButton: UIButton!
override func viewDidLoad() {
super.viewDidLoad()
// Uncomment the following line to preserve selection between presentations
// self.clearsSelectionOnViewWillAppear = false
// Uncomment the following line to display an Edit button in the navigation bar for this view controller.
// self.navigationItem.rightBarButtonItem = self.editButtonItem()
setup()
}
fileprivate func setup() {
setupAddButton()
}
fileprivate func setupAddButton() {
makeViewRoundWithShadow(addButton)
}
}
// MARK: - UITableViewDataSource
extension TrainingTableViewController: UITableViewDataSource {
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 0
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "Cell") ?? UITableViewCell()
self.configureCell(cell: cell, atIndexPath: indexPath)
return cell
}
func configureCell(cell: UITableViewCell, atIndexPath indexPath: IndexPath) {
// guard let homeViewCell = cell as? HomeViewCell else { return }
// let checkIn = fetchedResultsController.object(at: indexPath)
// homeViewCell.eventLabel.text = checkIn.event.name
// homeViewCell.leaderboardLabel.text = checkIn.leaderboard.name
// homeViewCell.competitorLabel.text = checkIn.name
}
}
// MARK: - UITableViewDelegate
extension TrainingTableViewController: UITableViewDelegate {
}