Skip to content

Commit

Permalink
Initial Commit of VIPER SWIFT
Browse files Browse the repository at this point in the history
  • Loading branch information
Conrad Stoll committed Jun 7, 2014
1 parent 3c101e3 commit 59481f2
Show file tree
Hide file tree
Showing 76 changed files with 2,858 additions and 7 deletions.
24 changes: 17 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
# CocoaPods
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control?
#
# Pods/
# Xcode
.DS_Store
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
profile
*.moved-aside
DerivedData
.idea/

/Build
844 changes: 844 additions & 0 deletions VIPER-SWIFT.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

181 changes: 181 additions & 0 deletions VIPER-SWIFT/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -0,0 +1,181 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6154.17" systemVersion="14A238x" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="F64-Qc-pGf">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6153.11"/>
</dependencies>
<scenes>
<!--Navigation Controller-->
<scene sceneID="UyX-pX-bWz">
<objects>
<navigationController storyboardIdentifier="RootNavigationController" definesPresentationContext="YES" id="F64-Qc-pGf" sceneMemberID="viewController">
<navigationBar key="navigationBar" contentMode="scaleToFill" id="idV-hc-xmw">
<autoresizingMask key="autoresizingMask"/>
<color key="barTintColor" red="0.29411765933036804" green="0.24705883860588074" blue="0.31764706969261169" alpha="1" colorSpace="deviceRGB"/>
<textAttributes key="titleTextAttributes">
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
</textAttributes>
</navigationBar>
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="3dq-0l-aAE" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="285" y="258"/>
</scene>
<!--List View Controller-->
<scene sceneID="3cb-9L-uJQ">
<objects>
<viewController storyboardIdentifier="ListViewController" id="fkI-WS-Ttb" customClass="ListViewController" customModule="VIPER_SWIFT" customModuleProvider="target" sceneMemberID="viewController">
<simulatedNavigationBarMetrics key="simulatedTopBarMetrics" prompted="NO"/>
<connections>
<outlet property="noContentView" destination="LnP-t5-94n" id="RLE-R0-gnE"/>
<outlet property="view" destination="Dwl-V3-Jpn" id="2lt-bQ-rWx"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="yCQ-Zn-gYP" userLabel="First Responder" sceneMemberID="firstResponder"/>
<view contentMode="scaleToFill" id="LnP-t5-94n">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="empty" translatesAutoresizingMaskIntoConstraints="NO" id="IUm-Nr-pH8">
<rect key="frame" x="80" y="204" width="160" height="160"/>
</imageView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="IUm-Nr-pH8" firstAttribute="centerX" secondItem="LnP-t5-94n" secondAttribute="centerX" id="gRj-qi-rft"/>
<constraint firstItem="IUm-Nr-pH8" firstAttribute="centerY" secondItem="LnP-t5-94n" secondAttribute="centerY" id="kx6-eL-hJB"/>
</constraints>
</view>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="10" sectionFooterHeight="10" id="Dwl-V3-Jpn">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
<prototypes>
<tableViewCell contentMode="scaleToFill" ambiguous="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="ListEntryCell" textLabel="NBj-2E-azl" detailTextLabel="1oT-NU-IFa" style="IBUITableViewCellStyleValue1" id="Rhp-dv-i8T">
<rect key="frame" x="0.0" y="55" width="320" height="44"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Rhp-dv-i8T" id="gVg-IG-mur">
<rect key="frame" x="0.0" y="0.0" width="320" height="43"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Title" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="NBj-2E-azl">
<rect key="frame" x="15" y="11" width="33" height="21"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Detail" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="1oT-NU-IFa">
<rect key="frame" x="261" y="11" width="44" height="21"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="0.55686274509803924" green="0.55686274509803924" blue="0.57647058823529407" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</tableViewCellContentView>
</tableViewCell>
</prototypes>
<connections>
<outlet property="dataSource" destination="fkI-WS-Ttb" id="6gG-2P-cYQ"/>
<outlet property="delegate" destination="fkI-WS-Ttb" id="AGj-0F-xMw"/>
</connections>
</tableView>
</objects>
<point key="canvasLocation" x="763" y="258"/>
</scene>
<!--Add View Controller-->
<scene sceneID="3ka-5n-3Fy">
<objects>
<viewController storyboardIdentifier="AddViewController" id="VVU-X2-hxx" customClass="AddViewController" customModule="VIPER_SWIFT" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="RT2-y8-tUl"/>
<viewControllerLayoutGuide type="bottom" id="x5o-vQ-Jpy"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="puj-mY-GLS">
<rect key="frame" x="0.0" y="0.0" width="260" height="360"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<navigationBar contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="uZz-El-SCH">
<rect key="frame" x="0.0" y="0.0" width="260" height="44"/>
<color key="barTintColor" red="0.29411765933036804" green="0.24705883860588074" blue="0.31764706969261169" alpha="1" colorSpace="deviceRGB"/>
<textAttributes key="titleTextAttributes">
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
</textAttributes>
<items>
<navigationItem title="Add" id="yGm-6E-lwf">
<barButtonItem key="leftBarButtonItem" title="Cancel" id="d3f-DO-Rzg">
<connections>
<action selector="cancel:" destination="VVU-X2-hxx" id="le7-aR-Kp0"/>
</connections>
</barButtonItem>
<barButtonItem key="rightBarButtonItem" title="Save" style="done" id="dLA-JN-ic5">
<connections>
<action selector="save:" destination="VVU-X2-hxx" id="hl7-Tm-kVW"/>
</connections>
</barButtonItem>
</navigationItem>
</items>
</navigationBar>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Todo" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="yGG-G0-t38">
<rect key="frame" x="40" y="49" width="74" height="30"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="XfR-vQ-kf1">
<rect key="frame" x="84" y="48" width="173" height="34"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits"/>
<connections>
<outlet property="delegate" destination="VVU-X2-hxx" id="9oO-P6-BNQ"/>
</connections>
</textField>
<datePicker contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" datePickerMode="date" minuteInterval="1" translatesAutoresizingMaskIntoConstraints="NO" id="gW8-Uc-U23">
<rect key="frame" x="0.0" y="102" width="260" height="162"/>
<date key="date" timeIntervalSinceReferenceDate="422464776.95016199">
<!--<__NSDate Class=2014-05-22 15:19:36 +0000 timeInterval=422464776.950162 ISO8601=2014-05-22T08:19:36.950-0700>-->
</date>
</datePicker>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Due Date" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hIS-VJ-zb9">
<rect key="frame" x="40" y="91" width="72" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="highlightedColor"/>
</label>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="line" translatesAutoresizingMaskIntoConstraints="NO" id="WUZ-qj-Yt6">
<rect key="frame" x="0.0" y="80" width="260" height="5"/>
</imageView>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="notes" translatesAutoresizingMaskIntoConstraints="NO" id="pS2-NO-UB3">
<rect key="frame" x="8" y="53" width="20" height="20"/>
</imageView>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="month" translatesAutoresizingMaskIntoConstraints="NO" id="a6r-P3-jNd">
<rect key="frame" x="8" y="91" width="20" height="20"/>
</imageView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view>
<nil key="simulatedStatusBarMetrics"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<size key="freeformSize" width="260" height="360"/>
<connections>
<outlet property="datePicker" destination="gW8-Uc-U23" id="Vhx-3Y-GeD"/>
<outlet property="nameTextField" destination="XfR-vQ-kf1" id="2rA-zO-2UG"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="SGJ-rb-dsp" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1230" y="338"/>
</scene>
</scenes>
<resources>
<image name="empty" width="160" height="160"/>
<image name="line" width="240" height="5"/>
<image name="month" width="25" height="25"/>
<image name="notes" width="25" height="25"/>
</resources>
<simulatedMetricsContainer key="defaultSimulatedMetrics">
<simulatedStatusBarMetrics key="statusBar"/>
<simulatedOrientationMetrics key="orientation"/>
<simulatedScreenMetrics key="destination" type="retina4"/>
</simulatedMetricsContainer>
<color key="tintColor" red="0.86274516582489014" green="0.48627454042434692" blue="0.39215689897537231" alpha="1" colorSpace="deviceRGB"/>
</document>
23 changes: 23 additions & 0 deletions VIPER-SWIFT/Classes/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
//
// AppDelegate.swift
// VIPER-SWIFT
//
// Created by Conrad Stoll on 6/5/14.
// Copyright (c) 2014 Conrad Stoll. All rights reserved.
//

import UIKit

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?

let appDependencies = AppDependencies()

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: NSDictionary?) -> Bool {
appDependencies.installRootViewControllerIntoWindow(window!)

return true
}
}

58 changes: 58 additions & 0 deletions VIPER-SWIFT/Classes/AppDependencies.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
//
// AppDependencies.swift
// VIPER TODO
//
// Created by Conrad Stoll on 6/4/14.
// Copyright (c) 2014 Mutual Mobile. All rights reserved.
//

import Foundation
import UIKit

class AppDependencies {
var listWireframe = ListWireframe()

init() {
configureDependencies()
}

func installRootViewControllerIntoWindow(window: UIWindow) {
listWireframe.presentListInterfaceFromWindow(window)
}

func configureDependencies() {
let coreDataStore = CoreDataStore()
let clock = DeviceClock()
let rootWireframe = RootWireframe()

let listPresenter = ListPresenter()
let listDataManager = ListDataManager()
let listInteractor = ListInteractor(dataManager: listDataManager, clock: clock)

let addWireframe = AddWireframe()
let addInteractor = AddInteractor()
let addPresenter = AddPresenter()
let addDataManager = AddDataManager()

listInteractor.output = listPresenter

listPresenter.listInteractor = listInteractor
listPresenter.listWireframe = listWireframe

listWireframe.addWireframe = addWireframe
listWireframe.listPresenter = listPresenter
listWireframe.rootWireframe = rootWireframe

listDataManager.coreDataStore = coreDataStore

addInteractor.addDataManager = addDataManager

addWireframe.addPresenter = addPresenter

addPresenter.addWireframe = addWireframe
addPresenter.addModuleDelegate = listPresenter
addPresenter.addInteractor = addInteractor

addDataManager.dataStore = coreDataStore
}
}
Loading

0 comments on commit 59481f2

Please sign in to comment.