Skip to content

Commit

Permalink
General look and feel
Browse files Browse the repository at this point in the history
- Defined application flow and added assets
- Added first API data point and Model for Imports
  • Loading branch information
mcrollin committed Oct 15, 2015
1 parent 06c02a3 commit b3c10bd
Show file tree
Hide file tree
Showing 65 changed files with 1,983 additions and 296 deletions.
705 changes: 491 additions & 214 deletions Drivecast.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0700"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "49FC9A1D1BCFB5D4006FA40E"
BuildableName = "Drivecast.app"
BlueprintName = "Drivecast"
ReferencedContainer = "container:Drivecast.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "NO"
buildForRunning = "NO"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "49FC9A3C1BCFB5D4006FA40E"
BuildableName = "DrivecastUITests.xctest"
BlueprintName = "DrivecastUITests"
ReferencedContainer = "container:Drivecast.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Production Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "49FC9A311BCFB5D4006FA40E"
BuildableName = "DrivecastTests.xctest"
BlueprintName = "DrivecastTests"
ReferencedContainer = "container:Drivecast.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "49FC9A1D1BCFB5D4006FA40E"
BuildableName = "Drivecast.app"
BlueprintName = "Drivecast"
ReferencedContainer = "container:Drivecast.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Production Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "49FC9A1D1BCFB5D4006FA40E"
BuildableName = "Drivecast.app"
BlueprintName = "Drivecast"
ReferencedContainer = "container:Drivecast.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Production Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "49FC9A1D1BCFB5D4006FA40E"
BuildableName = "Drivecast.app"
BlueprintName = "Drivecast"
ReferencedContainer = "container:Drivecast.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Production Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Production Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
119 changes: 119 additions & 0 deletions Drivecast.xcodeproj/xcshareddata/xcschemes/Drivecast Staging.xcscheme
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0700"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "49FC9A1D1BCFB5D4006FA40E"
BuildableName = "Drivecast.app"
BlueprintName = "Drivecast"
ReferencedContainer = "container:Drivecast.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "NO"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "49FC9A311BCFB5D4006FA40E"
BuildableName = "DrivecastTests.xctest"
BlueprintName = "DrivecastTests"
ReferencedContainer = "container:Drivecast.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "NO"
buildForRunning = "NO"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "49FC9A3C1BCFB5D4006FA40E"
BuildableName = "DrivecastUITests.xctest"
BlueprintName = "DrivecastUITests"
ReferencedContainer = "container:Drivecast.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Staging Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "49FC9A1D1BCFB5D4006FA40E"
BuildableName = "Drivecast.app"
BlueprintName = "Drivecast"
ReferencedContainer = "container:Drivecast.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Staging Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "49FC9A1D1BCFB5D4006FA40E"
BuildableName = "Drivecast.app"
BlueprintName = "Drivecast"
ReferencedContainer = "container:Drivecast.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Staging Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "49FC9A1D1BCFB5D4006FA40E"
BuildableName = "Drivecast.app"
BlueprintName = "Drivecast"
ReferencedContainer = "container:Drivecast.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Staging Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Staging Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
58 changes: 19 additions & 39 deletions Drivecast/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,63 +2,43 @@
// AppDelegate.swift
// Drivecast
//
// Created by Marc Rollin on 10/5/15.
// Created by Marc Rollin on 10/15/15.
// Copyright © 2015 Safecast. All rights reserved.
//

import UIKit
import CoreData
import DynamicColor

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

var window: UIWindow?


func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {

appearanceSetup()

return true
}

private func appearanceSetup() {
let color = UIColor(hexString: "#2980b9")
let mainColor = UIColor(named: .Main)
let fontSize:CGFloat = UIFont.systemFontSize()

self.window?.tintColor = color
// UIApplication.sharedApplication().statusBarStyle = .LightContent
// UINavigationBar.appearance().translucent = true
// UINavigationBar.appearance().barTintColor = color.colorWithAlphaComponent(0.5)
// UINavigationBar.appearance().tintColor = UIColor.whiteColor()
// UINavigationBar.appearance().titleTextAttributes = [NSForegroundColorAttributeName:UINavigationBar.appearance().tintColor,
// NSFontAttributeName:UIFont(name: "HelveticaNeue-Light", size: 18)!]
// UIAlertView.appearance().tintColor = color
// UIActionSheet.appearance().tintColor = color
}

func applicationWillResignActive(application: UIApplication) {
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
}

func applicationDidEnterBackground(application: UIApplication) {
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}

func applicationWillEnterForeground(application: UIApplication) {
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
}

func applicationDidBecomeActive(application: UIApplication) {
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}

func applicationWillTerminate(application: UIApplication) {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
// Saves changes in the application's managed object context before the application terminates.
if #available(iOS 8.2, *) {
let font = UIFont.systemFontOfSize(fontSize, weight: UIFontWeightLight)

UINavigationBar.appearance().titleTextAttributes = [NSFontAttributeName: font]
} else {
let font = UIFont.systemFontOfSize(fontSize)

UINavigationBar.appearance().titleTextAttributes = [NSFontAttributeName: font]
}

self.window?.tintColor = mainColor
UIWindow.appearance().tintColor = mainColor
UIAlertView.appearance().tintColor = mainColor
UIActionSheet.appearance().tintColor = mainColor
UITabBar.appearance().translucent = false
UINavigationBar.appearance().translucent = false
}

}

22 changes: 22 additions & 0 deletions Drivecast/Extensions/JSON.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
//
// JSON.swift
// Drivecast
//
// Created by Marc Rollin on 10/15/15.
// Copyright © 2015 Safecast. All rights reserved.
//

import Foundation
import SwiftyJSON

extension JSON: JSONCollectionDecodable {
static func collection<T: JSONDecodable>(json: Array<JSON>) throws -> [T] {
var collection = [T]()

for element in json {
collection.append(try T(json: element)!)
}

return collection
}
}
26 changes: 26 additions & 0 deletions Drivecast/Extensions/UIColor.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// Generated using SwiftGen, by O.Halligon — https://github.com/AliSoftware/SwiftGen

import UIKit

extension UIColor {
convenience init(rgbaValue: UInt32) {
let red = CGFloat((rgbaValue >> 24) & 0xff) / 255.0
let green = CGFloat((rgbaValue >> 16) & 0xff) / 255.0
let blue = CGFloat((rgbaValue >> 8) & 0xff) / 255.0
let alpha = CGFloat((rgbaValue ) & 0xff) / 255.0

self.init(red: red, green: green, blue: blue, alpha: alpha)
}
}

extension UIColor {
enum Name : UInt32 {
case Background = 0xf4f8f8ff
case Main = 0x2ecc71ff
}

convenience init(named name: Name) {
self.init(rgbaValue: name.rawValue)
}
}

24 changes: 24 additions & 0 deletions Drivecast/Extensions/UIImage.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// Generated using SwiftGen, by O.Halligon — https://github.com/AliSoftware/SwiftGen

import Foundation
import UIKit

extension UIImage {
enum Asset : String {
case Home = "Home"
case More = "More"
case Record = "Record"
case Upload = "Upload"
case SafecastLettersBig = "SafecastLettersBig"
case SafecastLettersSmall = "SafecastLettersSmall"

var image: UIImage {
return UIImage(asset: self)
}
}

convenience init(asset: Asset) {
self.init(named: asset.rawValue)!
}
}

Loading

0 comments on commit b3c10bd

Please sign in to comment.