Skip to content

Commit

Permalink
added SettingsViewController, renamed ViewController to TipsViewContr…
Browse files Browse the repository at this point in the history
…oller
  • Loading branch information
jontsai committed Aug 28, 2014
1 parent 7823039 commit 3d830bf
Show file tree
Hide file tree
Showing 5 changed files with 91 additions and 10 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
xcuserdata
xcshareddata
22 changes: 18 additions & 4 deletions tips.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
objects = {

/* Begin PBXBuildFile section */
56BA62E219AFD6E20058D60C /* SettingsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 56BA62E119AFD6E20058D60C /* SettingsViewController.swift */; };
56D6304519A608CD0005D112 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 56D6304419A608CD0005D112 /* AppDelegate.swift */; };
56D6304719A608CD0005D112 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 56D6304619A608CD0005D112 /* ViewController.swift */; };
56D6304719A608CD0005D112 /* TipsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 56D6304619A608CD0005D112 /* TipsViewController.swift */; };
56D6304A19A608CD0005D112 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 56D6304819A608CD0005D112 /* Main.storyboard */; };
56D6304C19A608CD0005D112 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 56D6304B19A608CD0005D112 /* Images.xcassets */; };
56D6305819A608CD0005D112 /* tipsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 56D6305719A608CD0005D112 /* tipsTests.swift */; };
Expand All @@ -25,10 +26,11 @@
/* End PBXContainerItemProxy section */

/* Begin PBXFileReference section */
56BA62E119AFD6E20058D60C /* SettingsViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SettingsViewController.swift; path = viewControllers/SettingsViewController.swift; sourceTree = "<group>"; };
56D6303F19A608CD0005D112 /* tips.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = tips.app; sourceTree = BUILT_PRODUCTS_DIR; };
56D6304319A608CD0005D112 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
56D6304419A608CD0005D112 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
56D6304619A608CD0005D112 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
56D6304619A608CD0005D112 /* TipsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TipsViewController.swift; sourceTree = "<group>"; };
56D6304919A608CD0005D112 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
56D6304B19A608CD0005D112 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
56D6305119A608CD0005D112 /* tipsTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = tipsTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
Expand All @@ -54,6 +56,15 @@
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
56BA62E319AFD7D90058D60C /* View Controllers */ = {
isa = PBXGroup;
children = (
56D6304619A608CD0005D112 /* TipsViewController.swift */,
56BA62E119AFD6E20058D60C /* SettingsViewController.swift */,
);
name = "View Controllers";
sourceTree = "<group>";
};
56D6303619A608CD0005D112 = {
isa = PBXGroup;
children = (
Expand All @@ -75,8 +86,8 @@
56D6304119A608CD0005D112 /* tips */ = {
isa = PBXGroup;
children = (
56BA62E319AFD7D90058D60C /* View Controllers */,
56D6304419A608CD0005D112 /* AppDelegate.swift */,
56D6304619A608CD0005D112 /* ViewController.swift */,
56D6304819A608CD0005D112 /* Main.storyboard */,
56D6304B19A608CD0005D112 /* Images.xcassets */,
56D6304219A608CD0005D112 /* Supporting Files */,
Expand Down Expand Up @@ -208,8 +219,9 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
56D6304719A608CD0005D112 /* ViewController.swift in Sources */,
56D6304719A608CD0005D112 /* TipsViewController.swift in Sources */,
56D6304519A608CD0005D112 /* AppDelegate.swift in Sources */,
56BA62E219AFD6E20058D60C /* SettingsViewController.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -397,6 +409,7 @@
56D6305D19A608CD0005D112 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
56D6305E19A608CD0005D112 /* Build configuration list for PBXNativeTarget "tipsTests" */ = {
isa = XCConfigurationList;
Expand All @@ -405,6 +418,7 @@
56D6306019A608CD0005D112 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
Expand Down
41 changes: 36 additions & 5 deletions tips/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7026.1"/>
</dependencies>
<scenes>
<!--View Controller-->
<!--Tips View Controller-->
<scene sceneID="ufC-wZ-h7g">
<objects>
<viewController id="vXZ-lx-hvc" customClass="ViewController" customModule="tips" customModuleProvider="target" sceneMemberID="viewController">
<viewController id="vXZ-lx-hvc" customClass="TipsViewController" customModule="tips" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="kh9-bI-dsS">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
Expand Down Expand Up @@ -81,7 +81,13 @@
<outletCollection property="gestureRecognizers" destination="EMP-Ib-VdS" appends="YES" id="ohC-Qt-sp3"/>
</connections>
</view>
<navigationItem key="navigationItem" id="BTO-eQ-rG9"/>
<navigationItem key="navigationItem" id="BTO-eQ-rG9">
<barButtonItem key="rightBarButtonItem" title="Settings" id="sk8-i3-uBf">
<connections>
<segue destination="s3F-Lk-oU5" kind="modal" identifier="settingsSegue" id="8XM-Tr-TYx"/>
</connections>
</barButtonItem>
</navigationItem>
<connections>
<outlet property="billField" destination="OYU-2d-3um" id="hHS-Oo-DTp"/>
<outlet property="tipControl" destination="Hst-0w-ZrR" id="Qz1-UH-tV8"/>
Expand All @@ -96,7 +102,32 @@
</connections>
</tapGestureRecognizer>
</objects>
<point key="canvasLocation" x="779" y="316"/>
<point key="canvasLocation" x="596" y="316"/>
</scene>
<!--Settings View Controller-->
<scene sceneID="0ja-OF-8sT">
<objects>
<viewController id="s3F-Lk-oU5" customClass="SettingsViewController" customModule="tips" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="Mfn-Dj-Q0v">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Make any changes to your settings" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="x6E-On-53A">
<rect key="frame" x="26" y="93" width="268" height="21"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</view>
<toolbarItems/>
<simulatedToolbarMetrics key="simulatedBottomBarMetrics"/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="TAW-e2-TIN" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1075" y="316"/>
</scene>
<!--Navigation Controller-->
<scene sceneID="7ef-Gr-cfm">
Expand All @@ -115,7 +146,7 @@
<placeholder placeholderIdentifier="IBFirstResponder" id="bOo-nI-DVd" userLabel="First Responder" sceneMemberID="firstResponder"/>
<barButtonItem title="Settings" id="RQV-oy-Cpc"/>
</objects>
<point key="canvasLocation" x="247" y="316"/>
<point key="canvasLocation" x="140" y="316"/>
</scene>
</scenes>
<simulatedMetricsContainer key="defaultSimulatedMetrics">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import UIKit

class ViewController: UIViewController {
class TipsViewController: UIViewController {

@IBOutlet weak var billField: UITextField!
@IBOutlet weak var tipLabel: UILabel!
Expand Down
35 changes: 35 additions & 0 deletions tips/viewControllers/SettingsViewController.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
//
// SettingsViewController.swift
// tips
//
// Created by Jonathan Tsai on 8/28/14.
// Copyright (c) 2014 hacktoolkit. All rights reserved.
//

import UIKit

class SettingsViewController: UIViewController {

override func viewDidLoad() {
super.viewDidLoad()

// Do any additional setup after loading the view.
}

override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}


/*
// MARK: - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
override func prepareForSegue(segue: UIStoryboardSegue!, sender: AnyObject!) {
// Get the new view controller using segue.destinationViewController.
// Pass the selected object to the new view controller.
}
*/

}

0 comments on commit 3d830bf

Please sign in to comment.