home screen & fixes

This commit is contained in:
Konstantin Gonikman committed 2016-03-21 18:04:16 +01:00
1 parent 73591c4194
commit 95aa9cc02f
23 files changed
+137 -32

No files matched your search

@@ -317,6 +317,7 @@
7FED45CA1A25F5910022505F /* event1.json in Resources */ = {isa = PBXBuildFile; fileRef = 7FED45C41A25F5900022505F /* event1.json */; };
7FED45CC1A25F5910022505F /* leaderboard1.json in Resources */ = {isa = PBXBuildFile; fileRef = 7FED45C61A25F5900022505F /* leaderboard1.json */; };
9E95C3D61C723AB30016632B /* Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9E95C3D51C723AB30016632B /* Constants.swift */; };
9ECBDDAE1C9C4F0300F76AEB /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 9ECBDDAD1C9C4F0300F76AEB /* LaunchScreen.storyboard */; };
C8603D4A1C528832002B2F28 /* Acknowledgements.markdown in Sources */ = {isa = PBXBuildFile; fileRef = C8603D491C528832002B2F28 /* Acknowledgements.markdown */; };
C8603D511C52892A002B2F28 /* Acknowledgements.markdown in Resources */ = {isa = PBXBuildFile; fileRef = C8603D491C528832002B2F28 /* Acknowledgements.markdown */; };
C8A4400B1C18153600DF70A0 /* Settings.bundle in Resources */ = {isa = PBXBuildFile; fileRef = C8A4400A1C18153600DF70A0 /* Settings.bundle */; };
@@ -686,6 +687,7 @@
7FED45C41A25F5900022505F /* event1.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = event1.json; sourceTree = "<group>"; };
7FED45C61A25F5900022505F /* leaderboard1.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = leaderboard1.json; sourceTree = "<group>"; };
9E95C3D51C723AB30016632B /* Constants.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Constants.swift; sourceTree = "<group>"; };
9ECBDDAD1C9C4F0300F76AEB /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = "<group>"; };
C8603D491C528832002B2F28 /* Acknowledgements.markdown */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = Acknowledgements.markdown; sourceTree = "<group>"; };
C8A4400A1C18153600DF70A0 /* Settings.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = Settings.bundle; sourceTree = "<group>"; };
C8B31F771B68DAD400C8A809 /* Pods.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Pods.xcodeproj; path = Pods/Pods.xcodeproj; sourceTree = "<group>"; };
@@ -1059,6 +1061,7 @@
7F72C73F1A2DEA2100F48EE8 /* Resources */ = {
isa = PBXGroup;
children = (
9ECBDDAD1C9C4F0300F76AEB /* LaunchScreen.storyboard */,
7F83F15919F154F000C53328 /* Main.storyboard */,
7F4D2F531A1C8EE50038E7D1 /* Images.xcassets */,
7F87CA9D1A2CCE8B0076C617 /* OpenSans-Bold.ttf */,
@@ -1517,6 +1520,7 @@
7F14A1501A13B9A6001C1ECB /* CW.png in Resources */,
7F14A1141A13B9A6001C1ECB /* _northern-cyprus.png in Resources */,
7F14A13E1A13B9A6001C1ECB /* BW.png in Resources */,
9ECBDDAE1C9C4F0300F76AEB /* LaunchScreen.storyboard in Resources */,
7F14A1481A13B9A6001C1ECB /* CK.png in Resources */,
7F14A11B1A13B9A6001C1ECB /* _unknown.png in Resources */,
7F14A19B1A13B9A6001C1ECB /* LI.png in Resources */,
@@ -1789,7 +1793,6 @@
baseConfigurationReference = EA431711E588F5A2B31A62AC /* Pods.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
EMBEDDED_CONTENT_CONTAINS_SWIFT = YES;
@@ -1802,7 +1805,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
SWIFT_OBJC_BRIDGING_HEADER = SAPTracker/bridge.h;
TARGETED_DEVICE_FAMILY = 1;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
@@ -1811,7 +1814,6 @@
baseConfigurationReference = CF98F25F363113C51C7CB1F3 /* Pods.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
EMBEDDED_CONTENT_CONTAINS_SWIFT = YES;
@@ -1824,7 +1826,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
SWIFT_OBJC_BRIDGING_HEADER = SAPTracker/bridge.h;
TARGETED_DEVICE_FAMILY = 1;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
};
@@ -21,6 +21,11 @@ class AboutViewController: UIViewController {
} else {
versionLabel.text = "-"
}
// add logo to top left
let imageView = UIImageView(image: UIImage(named: "sap_logo"))
let barButtonItem = UIBarButtonItem(customView: imageView)
navigationItem.leftBarButtonItem = barButtonItem
}
@IBAction func done(sender: AnyObject) {
@@ -1,8 +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" useTraitCollections="YES" initialViewController="pqQ-jd-OwW">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="9532" systemVersion="15D21" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="3xl-Yh-rPF">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9530"/>
<capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
</dependencies>
<customFonts key="customFonts">
@@ -221,7 +222,7 @@
<!--Navigation Controller-->
<scene sceneID="e3W-CJ-soQ">
<objects>
<navigationController id="pqQ-jd-OwW" sceneMemberID="viewController">
<navigationController storyboardIdentifier="rootViewController" id="pqQ-jd-OwW" sceneMemberID="viewController">
<navigationBar key="navigationBar" contentMode="scaleToFill" translucent="NO" id="x3H-m5-yJB">
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
@@ -1289,6 +1290,38 @@
</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>
@@ -1360,6 +1393,7 @@
</scenes>
<resources>
<image name="DE.png" width="64" height="64"/>
<image name="applogo" width="365" height="96"/>
<image name="camera" width="24" height="24"/>
<image name="edit" width="33" height="33"/>
<image name="home_bg" width="980" height="653"/>
@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "applogo@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "applogo@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

@@ -6,8 +6,8 @@
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "sap_logo.png"
"filename" : "sap_logo@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

@@ -30,7 +30,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>29</string>
<string>30</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
@@ -51,6 +51,8 @@
<array>
<string>location</string>
</array>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
@@ -0,0 +1,46 @@
<?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">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9530"/>
<capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="Llm-lL-Icb"/>
<viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<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="XA8-DM-z3j">
<rect key="frame" x="117.5" y="252" width="365" height="96"/>
<constraints>
<constraint firstAttribute="width" secondItem="XA8-DM-z3j" secondAttribute="height" multiplier="365:96" id="nLx-D5-TPO"/>
</constraints>
</imageView>
</subviews>
<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="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="TsS-GE-Hlz"/>
</constraints>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
<resources>
<image name="applogo" width="365" height="96"/>
</resources>
</document>
@@ -15,6 +15,11 @@ class SettingsViewController: UITableViewController {
override func viewDidLoad() {
super.viewDidLoad()
batterySavingSwitch.setOn(BatteryManager.sharedManager.batterySavingPreference, animated: true)
// add logo to top left
let imageView = UIImageView(image: UIImage(named: "sap_logo"))
let barButtonItem = UIBarButtonItem(customView: imageView)
navigationItem.leftBarButtonItem = barButtonItem
}
@IBAction func batterySavingChanged(sender: UISwitch) {
@@ -8,27 +8,16 @@
import Foundation
/* Helper class used for created launch screens. */
class SplashScreenDummy: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// add logo to top left
let imageView = UIImageView(image: UIImage(named: "sap_logo"))
let barButtonItem = UIBarButtonItem(customView: imageView)
navigationItem.leftBarButtonItem = barButtonItem
final class SplashScreenDummy: UIViewController {
//UIApplication.sharedApplication().statusBarHidden = true
}
}
/* Uncomment this when creating launch screens. */
/*
extension UINavigationBar {
public override func sizeThatFits(size: CGSize) -> CGSize {
let newSize = CGSizeMake(UIScreen.mainScreen().bounds.width, 64)
return newSize
}
}
*/
override func viewDidAppear(animated: Bool) {
super.viewDidAppear(animated)
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
self.presentViewController(vc, animated: true, completion: nil)
}
}
}