Merge branch 'ubilabs--ios--develop'

This commit is contained in:
Axel Uhl committed 2016-04-01 14:58:28 +02:00
commit 90a16c9e62
6 files changed
+74 -74

No files matched your search

@@ -283,7 +283,6 @@
7F44095B19F65B5B0021BF22 /* CoreData.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 7F44095919F65B5B0021BF22 /* CoreData.xcdatamodeld */; };
7F4D2F541A1C8EE50038E7D1 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7F4D2F531A1C8EE50038E7D1 /* Images.xcassets */; };
7F4EEDBA1A6D2BAC0026F711 /* CheckIn.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F4EEDB91A6D2BAC0026F711 /* CheckIn.swift */; };
7F72C73A1A2DC51900F48EE8 /* SplashScreenDummy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F72C7391A2DC51900F48EE8 /* SplashScreenDummy.swift */; };
7F83F15619F154F000C53328 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F83F15519F154F000C53328 /* AppDelegate.swift */; };
7F83F15819F154F000C53328 /* HomeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F83F15719F154F000C53328 /* HomeViewController.swift */; };
7F83F15B19F154F000C53328 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 7F83F15919F154F000C53328 /* Main.storyboard */; };
@@ -648,7 +647,6 @@
7F44095A19F65B5B0021BF22 /* CoreData.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = CoreData.xcdatamodel; sourceTree = "<group>"; };
7F4D2F531A1C8EE50038E7D1 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
7F4EEDB91A6D2BAC0026F711 /* CheckIn.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CheckIn.swift; sourceTree = "<group>"; };
7F72C7391A2DC51900F48EE8 /* SplashScreenDummy.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SplashScreenDummy.swift; sourceTree = "<group>"; };
7F83F15019F154F000C53328 /* SAPTracker.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SAPTracker.app; sourceTree = BUILT_PRODUCTS_DIR; };
7F83F15419F154F000C53328 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
7F83F15519F154F000C53328 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
@@ -1080,7 +1078,6 @@
7FD9D3021A1236080058FEAD /* Extensions.swift */,
7F87CAA51A2CD6BA0076C617 /* Appearance.h */,
7F87CAA61A2CD6BA0076C617 /* Appearance.m */,
7F72C7391A2DC51900F48EE8 /* SplashScreenDummy.swift */,
9E95C3D51C723AB30016632B /* Constants.swift */,
);
name = Helpers;
@@ -1222,7 +1219,6 @@
TargetAttributes = {
7F83F14F19F154F000C53328 = {
CreatedOnToolsVersion = 6.0.1;
DevelopmentTeam = RRE8EFVCE3;
};
7F83F16419F154F000C53328 = {
CreatedOnToolsVersion = 6.0.1;
@@ -1621,7 +1617,6 @@
7F06590419F8094C0077FF95 /* DeviceUDIDManager.swift in Sources */,
7F3AA7C81A1CD7D700F8861F /* SendGPSFixController.swift in Sources */,
7FCDB6641A1636610075D7D9 /* LeaderBoard.swift in Sources */,
7F72C73A1A2DC51900F48EE8 /* SplashScreenDummy.swift in Sources */,
C8603D4A1C528832002B2F28 /* Acknowledgements.markdown in Sources */,
7F8B8D411A373B0200C34B88 /* SpeedViewController.swift in Sources */,
9E95C3D61C723AB30016632B /* Constants.swift in Sources */,
@@ -44,13 +44,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
}
func application(application: UIApplication, openURL url: NSURL, sourceApplication: String?, annotation: AnyObject) -> Bool {
if window!.rootViewController is SplashScreenDummy {
let storyboard = UIStoryboard(name: "Main", bundle: nil)
let vc = storyboard.instantiateViewControllerWithIdentifier("rootViewController")
self.window!.rootViewController = vc
}
let rootViewController = self.window!.rootViewController as! UINavigationController
rootViewController.popToRootViewControllerAnimated(false)
rootViewController.dismissViewControllerAnimated(false, completion: nil)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10116" systemVersion="15E65" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="3xl-Yh-rPF">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10116" systemVersion="15E65" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="pqQ-jd-OwW">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
@@ -210,6 +210,7 @@
<outlet property="btnScan" destination="Ieu-ch-jeI" id="FWs-OF-b4i"/>
<outlet property="tableView" destination="OXU-ft-TXZ" id="1BA-dy-00A"/>
<outlet property="tableViewHeight" destination="yuo-wx-0A1" id="pFK-q1-1DI"/>
<outlet property="vSplashScreen" destination="4Od-pk-xCd" id="3sj-Mx-34I"/>
<segue destination="G3a-SV-Maf" kind="show" identifier="Regatta" id="FMW-37-go1"/>
<segue destination="plm-Uw-c62" kind="show" identifier="Scan" id="U8l-If-CrF"/>
<segue destination="4Fb-v3-mkB" kind="presentation" identifier="Settings" id="Xxn-jp-xEB"/>
@@ -217,6 +218,26 @@
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="x5A-6p-PRh" sceneMemberID="firstResponder"/>
<view contentMode="scaleToFill" id="4Od-pk-xCd">
<rect key="frame" x="0.0" y="0.0" width="600" height="536"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="applogo" translatesAutoresizingMaskIntoConstraints="NO" id="K04-Lb-fSm">
<rect key="frame" x="117.5" y="220" width="365" height="96"/>
<constraints>
<constraint firstAttribute="width" secondItem="K04-Lb-fSm" secondAttribute="height" multiplier="365:96" id="iTN-7Q-YkX"/>
</constraints>
</imageView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="K04-Lb-fSm" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="4Od-pk-xCd" secondAttribute="leading" constant="30" id="0ML-xS-Lk4"/>
<constraint firstItem="K04-Lb-fSm" firstAttribute="width" secondItem="K04-Lb-fSm" secondAttribute="height" multiplier="365:96" id="YeC-DN-aQX"/>
<constraint firstItem="K04-Lb-fSm" firstAttribute="centerY" secondItem="4Od-pk-xCd" secondAttribute="centerY" id="lJN-eB-asJ"/>
<constraint firstItem="K04-Lb-fSm" firstAttribute="centerX" secondItem="4Od-pk-xCd" secondAttribute="centerX" id="lP3-oq-Tj2"/>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="K04-Lb-fSm" secondAttribute="trailing" constant="30" id="tNv-UR-6vj"/>
</constraints>
</view>
</objects>
<point key="canvasLocation" x="1222" y="-307"/>
</scene>
@@ -1457,38 +1478,6 @@ Cg
</objects>
<point key="canvasLocation" x="436" y="-1945"/>
</scene>
<!--Splash Screen Dummy-->
<scene sceneID="PwG-Yg-AQc">
<objects>
<viewController id="3xl-Yh-rPF" customClass="SplashScreenDummy" customModule="SAPTracker" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="Hws-lE-q8T"/>
<viewControllerLayoutGuide type="bottom" id="igh-Dw-QZa"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="Lwx-VP-jF5">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="applogo" translatesAutoresizingMaskIntoConstraints="NO" id="oHR-Ls-GFI">
<rect key="frame" x="118" y="252" width="365" height="96"/>
<constraints>
<constraint firstAttribute="width" secondItem="oHR-Ls-GFI" secondAttribute="height" multiplier="365:96" id="wUK-xV-MEN"/>
</constraints>
</imageView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="oHR-Ls-GFI" firstAttribute="centerX" secondItem="Lwx-VP-jF5" secondAttribute="centerX" id="Hnb-6z-1mn"/>
<constraint firstItem="oHR-Ls-GFI" firstAttribute="centerY" secondItem="Lwx-VP-jF5" secondAttribute="centerY" id="XuX-Kd-dD3"/>
<constraint firstAttribute="trailingMargin" relation="greaterThanOrEqual" secondItem="oHR-Ls-GFI" secondAttribute="trailing" constant="20" id="gbR-Rb-T28"/>
<constraint firstItem="oHR-Ls-GFI" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="Lwx-VP-jF5" secondAttribute="leadingMargin" constant="20" id="gwk-4S-Gth"/>
</constraints>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dIP-aR-r8r" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="436" y="-988"/>
</scene>
<!--Leader Board-->
<scene sceneID="BcW-Cr-BGq">
<objects>
@@ -25,12 +25,15 @@ class HomeViewController: UIViewController, UITableViewDataSource, UITableViewDe
@IBOutlet weak var tableView: UITableView!
@IBOutlet weak var tableViewHeight: NSLayoutConstraint!
@IBOutlet weak var activityIndicatorView: UIActivityIndicatorView!
@IBOutlet var vSplashScreen: UIView!
var fetchedResultsController: NSFetchedResultsController?
private var qrCodeManager: QRCodeManager?
override func viewDidLoad() {
super.viewDidLoad()
loadSplashScreen()
// set QR manager, needed in case app is being open by custom URL
qrCodeManager = QRCodeManager(delegate: self)
@@ -61,6 +64,50 @@ class HomeViewController: UIViewController, UITableViewDataSource, UITableViewDe
let barButtonItem = UIBarButtonItem(customView: imageView)
navigationItem.leftBarButtonItem = barButtonItem
}
func loadSplashScreen() {
if let keyWindow = UIApplication.sharedApplication().keyWindow {
vSplashScreen.translatesAutoresizingMaskIntoConstraints = false
keyWindow.addSubview(vSplashScreen)
let lcTop = NSLayoutConstraint(item: vSplashScreen,
attribute: NSLayoutAttribute.Top,
relatedBy: NSLayoutRelation.Equal,
toItem: keyWindow,
attribute: NSLayoutAttribute.Top,
multiplier: 1.0,
constant: 0)
let lcBottom = NSLayoutConstraint(item: vSplashScreen,
attribute: NSLayoutAttribute.Bottom,
relatedBy: NSLayoutRelation.Equal,
toItem: keyWindow,
attribute: NSLayoutAttribute.Bottom,
multiplier: 1.0,
constant: 0)
let lcLeft = NSLayoutConstraint(item: vSplashScreen,
attribute: NSLayoutAttribute.Left,
relatedBy: NSLayoutRelation.Equal,
toItem: keyWindow,
attribute: NSLayoutAttribute.Left,
multiplier: 1.0,
constant: 0)
let lcRight = NSLayoutConstraint(item: vSplashScreen,
attribute: NSLayoutAttribute.Right,
relatedBy: NSLayoutRelation.Equal,
toItem: keyWindow,
attribute: NSLayoutAttribute.Right,
multiplier: 1.0,
constant: 0)
keyWindow.addConstraints([lcTop, lcBottom, lcLeft, lcRight])
weak var weakself = self
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, Int64(2 * Double(NSEC_PER_SEC))), dispatch_get_main_queue()) { () -> Void in
weakself?.vSplashScreen.removeFromSuperview()
}
}
}
deinit {
NSNotificationCenter.defaultCenter().removeObserver(self)
@@ -1,10 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="9532" systemVersion="15D21" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" initialViewController="01J-lp-oVM">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10116" systemVersion="15E65" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" initialViewController="01J-lp-oVM">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9530"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
<capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
</dependencies>
<scenes>
<!--View Controller-->
@@ -29,8 +28,8 @@
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="XA8-DM-z3j" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="4Bv-Zq-ZzP"/>
<constraint firstItem="XA8-DM-z3j" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="Ze5-6b-2t3" secondAttribute="leadingMargin" constant="20" id="EFm-df-I71"/>
<constraint firstAttribute="trailingMargin" relation="greaterThanOrEqual" secondItem="XA8-DM-z3j" secondAttribute="trailing" constant="20" id="KiK-A3-oaY"/>
<constraint firstItem="XA8-DM-z3j" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="Ze5-6b-2t3" secondAttribute="leading" constant="30" id="EFm-df-I71"/>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="XA8-DM-z3j" secondAttribute="trailing" constant="30" id="KiK-A3-oaY"/>
<constraint firstItem="XA8-DM-z3j" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="TsS-GE-Hlz"/>
</constraints>
</view>
@@ -1,24 +0,0 @@
//
// SplashScreenDummy.swift
// SAPTracker
//
// Created by computing on 02/12/14.
// Copyright (c) 2014 com.sap.sailing. All rights reserved.
//
import Foundation
final class SplashScreenDummy: UIViewController {
override func viewDidAppear(animated: Bool) {
super.viewDidAppear(animated)
weak var weakself = self
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, Int64(2 * Double(NSEC_PER_SEC))), dispatch_get_main_queue()) { () -> Void in
let storyboard = UIStoryboard(name: "Main", bundle: nil)
let vc = storyboard.instantiateViewControllerWithIdentifier("rootViewController")
vc.modalTransitionStyle = .CrossDissolve
weakself?.presentViewController(vc, animated: true, completion: nil)
}
}
}