├── UnitConverter
├── Images.xcassets
│ └── AppIcon.appiconset
│ │ ├── Icon-76.png
│ │ ├── Icon-60@2x.png
│ │ ├── Icon-60@3x.png
│ │ ├── Icon-76@2x.png
│ │ ├── Icon-Small.png
│ │ ├── Icon-83.5@2x.png
│ │ ├── Icon-Small@2x.png
│ │ ├── Icon-Small@3x.png
│ │ ├── Icon-Small@2x-1.png
│ │ ├── Icon-Spotlight-40.png
│ │ ├── Icon-Spotlight-40@2x.png
│ │ ├── Icon-Spotlight-40@3x.png
│ │ ├── Icon-Spotlight-40@2x-1.png
│ │ └── Contents.json
├── UnitConverter.swift
├── TemperatureRange.swift
├── Info.plist
├── ViewController.swift
├── AppDelegate.swift
└── Base.lproj
│ ├── LaunchScreen.xib
│ └── Main.storyboard
├── LICENSE
├── UnitConverter.xcodeproj
├── project.xcworkspace
│ └── contents.xcworkspacedata
└── project.pbxproj
├── .gitignore
├── UnitConverterTests
├── Info.plist
└── UnitConverterTests.swift
├── README.md
└── CONTRIBUTING.md
/UnitConverter/Images.xcassets/AppIcon.appiconset/Icon-76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SwiftEducation/UnitConverter/HEAD/UnitConverter/Images.xcassets/AppIcon.appiconset/Icon-76.png
--------------------------------------------------------------------------------
/UnitConverter/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SwiftEducation/UnitConverter/HEAD/UnitConverter/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png
--------------------------------------------------------------------------------
/UnitConverter/Images.xcassets/AppIcon.appiconset/Icon-60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SwiftEducation/UnitConverter/HEAD/UnitConverter/Images.xcassets/AppIcon.appiconset/Icon-60@3x.png
--------------------------------------------------------------------------------
/UnitConverter/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SwiftEducation/UnitConverter/HEAD/UnitConverter/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png
--------------------------------------------------------------------------------
/UnitConverter/Images.xcassets/AppIcon.appiconset/Icon-Small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SwiftEducation/UnitConverter/HEAD/UnitConverter/Images.xcassets/AppIcon.appiconset/Icon-Small.png
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License, by Yong Bakos.
2 |
3 | https://creativecommons.org/licenses/by-nc-sa/4.0/
4 |
--------------------------------------------------------------------------------
/UnitConverter/Images.xcassets/AppIcon.appiconset/Icon-83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SwiftEducation/UnitConverter/HEAD/UnitConverter/Images.xcassets/AppIcon.appiconset/Icon-83.5@2x.png
--------------------------------------------------------------------------------
/UnitConverter/Images.xcassets/AppIcon.appiconset/Icon-Small@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SwiftEducation/UnitConverter/HEAD/UnitConverter/Images.xcassets/AppIcon.appiconset/Icon-Small@2x.png
--------------------------------------------------------------------------------
/UnitConverter/Images.xcassets/AppIcon.appiconset/Icon-Small@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SwiftEducation/UnitConverter/HEAD/UnitConverter/Images.xcassets/AppIcon.appiconset/Icon-Small@3x.png
--------------------------------------------------------------------------------
/UnitConverter/Images.xcassets/AppIcon.appiconset/Icon-Small@2x-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SwiftEducation/UnitConverter/HEAD/UnitConverter/Images.xcassets/AppIcon.appiconset/Icon-Small@2x-1.png
--------------------------------------------------------------------------------
/UnitConverter/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SwiftEducation/UnitConverter/HEAD/UnitConverter/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40.png
--------------------------------------------------------------------------------
/UnitConverter/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SwiftEducation/UnitConverter/HEAD/UnitConverter/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40@2x.png
--------------------------------------------------------------------------------
/UnitConverter/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SwiftEducation/UnitConverter/HEAD/UnitConverter/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40@3x.png
--------------------------------------------------------------------------------
/UnitConverter/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40@2x-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SwiftEducation/UnitConverter/HEAD/UnitConverter/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40@2x-1.png
--------------------------------------------------------------------------------
/UnitConverter.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Xcode
2 | #
3 | .DS_Store
4 | build/
5 | *.pbxuser
6 | !default.pbxuser
7 | *.mode1v3
8 | !default.mode1v3
9 | *.mode2v3
10 | !default.mode2v3
11 | *.perspectivev3
12 | !default.perspectivev3
13 | xcuserdata
14 | *.xccheckout
15 | *.moved-aside
16 | DerivedData
17 | *.hmap
18 | *.ipa
19 | *.xcuserstate
20 |
--------------------------------------------------------------------------------
/UnitConverter/UnitConverter.swift:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike
4 | 4.0 International License, by Yong Bakos.
5 |
6 | */
7 |
8 | import Foundation
9 |
10 | class UnitConverter {
11 |
12 | func degreesFahrenheit(_ degreesCelsius: Int) -> Int {
13 | return Int(1.8 * Float(degreesCelsius) + 32.0)
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/UnitConverter/TemperatureRange.swift:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike
4 | 4.0 International License, by Yong Bakos.
5 |
6 | */
7 |
8 | import UIKit
9 |
10 | class TemperatureRange: NSObject, UIPickerViewDataSource {
11 |
12 | let values = (-100...100).map { $0 }
13 |
14 | func numberOfComponents(in pickerView: UIPickerView) -> Int {
15 | return 1
16 | }
17 |
18 | func pickerView(_ pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int {
19 | return values.count
20 | }
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/UnitConverterTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | ## Deprecation Warning
4 |
5 | The Swift Education materials are out of date, and are no longer maintained.
6 |
7 | # UnitConverter
8 |
9 | ### Level 2, Eleven Lessons
10 |
11 | Teach students about delegates, delegation and protocols through the creation of a programming classic. Facilitate a deeper understanding of Model-View-Controller, and demonstrate how to persist data with NSUserDefaults.
12 |
13 | ## Contributing
14 |
15 | See [CONTRIBUTING.md](CONTRIBUTING.md).
16 |
17 | ## License
18 |
19 | This work is licensed under a [Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License](https://creativecommons.org/licenses/by-nc-sa/4.0/), by Yong Bakos.
20 |
--------------------------------------------------------------------------------
/UnitConverterTests/UnitConverterTests.swift:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike
4 | 4.0 International License, by Yong Bakos.
5 |
6 | */
7 |
8 | import UIKit
9 | import XCTest
10 |
11 | class UnitConverterTests: XCTestCase {
12 |
13 | override func setUp() {
14 | super.setUp()
15 | // Put setup code here. This method is called before the invocation of each test method in the class.
16 | }
17 |
18 | override func tearDown() {
19 | // Put teardown code here. This method is called after the invocation of each test method in the class.
20 | super.tearDown()
21 | }
22 |
23 | func testExample() {
24 | // This is an example of a functional test case.
25 | XCTAssert(true, "Pass")
26 | }
27 |
28 | func testPerformanceExample() {
29 | // This is an example of a performance test case.
30 | self.measure() {
31 | // Put the code you want to measure the time of here.
32 | }
33 | }
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # How to Contribute
2 |
3 | ## Post an Issue
4 |
5 | If you discover a bug or error, please add an issue here on GitHub. Feature requests are welcome. However, this is a community effort, so pull requests are preferred.
6 |
7 | ## Create a Pull Request
8 |
9 | Fork the project, create a branch, commit your changes, and then create a pull request. Please submit your pull request to the **develop** branch of this repository.
10 |
11 | The **master** branch is for production-ready code and should not contain incomplete features. Development occurs on the **develop** branch. Once your pull request is accepted, it will be merged into **master**.
12 |
13 | ## Tags
14 |
15 | This repository uses tags to mark intermediate steps of the app development, and these tags correspond to lessons in the [Teaching App Development with Swift](http://swifteducation.github.io) course materials. For example, the tag **lesson01** represents an Xcode project that is ready for working through the steps in Lesson 1. The **end** tag always represents the completed app, which represents an Xcode project that has accomplished all of the features within all of the respective lesson plans for the project.
16 |
17 | ## Impacts to Lesson Plans
18 |
19 | Please note that, because this Xcode project corresponds with lesson plans in the [Teaching App Development with Swift](http://swifteducation.github.io) course materials, you may also need to submit an issue or pull request in the [Teaching App Development with Swift repository](http://github.com/SwiftEducation/teaching-app-dev-swift).
20 |
21 |
--------------------------------------------------------------------------------
/UnitConverter/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 | UISupportedInterfaceOrientations~ipad
40 |
41 | UIInterfaceOrientationPortrait
42 | UIInterfaceOrientationPortraitUpsideDown
43 | UIInterfaceOrientationLandscapeLeft
44 | UIInterfaceOrientationLandscapeRight
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/UnitConverter/ViewController.swift:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike
4 | 4.0 International License, by Yong Bakos.
5 |
6 | */
7 |
8 | import UIKit
9 |
10 | class ViewController: UIViewController, UIPickerViewDelegate {
11 |
12 | let userDefaultsLastRowKey = "defaultCelsiusPickerRow"
13 |
14 | @IBOutlet var temperatureRange: TemperatureRange!
15 | @IBOutlet weak var temperatureLabel: UILabel!
16 | @IBOutlet weak var celsiusPicker: UIPickerView!
17 |
18 | fileprivate let converter = UnitConverter()
19 |
20 | override func viewDidLoad() {
21 | super.viewDidLoad()
22 | let row = initialPickerRow()
23 | celsiusPicker.selectRow(row, inComponent: 0, animated: false)
24 | pickerView(celsiusPicker, didSelectRow: row, inComponent: 0)
25 | }
26 |
27 | func initialPickerRow() -> Int {
28 | let savedRow = UserDefaults.standard.object(forKey: userDefaultsLastRowKey) as? Int
29 | if let row = savedRow {
30 | return row
31 | } else {
32 | return celsiusPicker.numberOfRows(inComponent: 0) / 2
33 | }
34 | }
35 |
36 | override func didReceiveMemoryWarning() {
37 | super.didReceiveMemoryWarning()
38 | // Dispose of any resources that can be recreated.
39 | }
40 |
41 | func pickerView(_ pickerView: UIPickerView, titleForRow row: Int, forComponent component: Int) -> String? {
42 | let celsiusValue = temperatureRange.values[row]
43 | return "\(celsiusValue)°C"
44 | }
45 |
46 | func pickerView(_ pickerView: UIPickerView, didSelectRow row: Int,
47 | inComponent component: Int) {
48 | displayConvertedTemperatureForRow(row)
49 | saveSelectedRow(row)
50 | }
51 |
52 | func displayConvertedTemperatureForRow(_ row: Int) {
53 | let degreesCelsius = temperatureRange.values[row]
54 | temperatureLabel.text = "\(converter.degreesFahrenheit(degreesCelsius))°F"
55 | }
56 |
57 | func saveSelectedRow(_ row: Int) {
58 | let defaults = UserDefaults.standard
59 | defaults.set(row, forKey: userDefaultsLastRowKey)
60 | defaults.synchronize()
61 | }
62 |
63 | }
64 |
65 |
--------------------------------------------------------------------------------
/UnitConverter/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike
4 | 4.0 International License, by Yong Bakos.
5 |
6 | */
7 |
8 | import UIKit
9 |
10 | @UIApplicationMain
11 | class AppDelegate: UIResponder, UIApplicationDelegate {
12 |
13 | var window: UIWindow?
14 |
15 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
16 | // Override point for customization after application launch.
17 | return true
18 | }
19 |
20 | func applicationWillResignActive(_ application: UIApplication) {
21 | // 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.
22 | // 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.
23 | }
24 |
25 | func applicationDidEnterBackground(_ application: UIApplication) {
26 | // 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.
27 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
28 | }
29 |
30 | func applicationWillEnterForeground(_ application: UIApplication) {
31 | // 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.
32 | }
33 |
34 | func applicationDidBecomeActive(_ application: UIApplication) {
35 | // 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.
36 | }
37 |
38 | func applicationWillTerminate(_ application: UIApplication) {
39 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
40 | }
41 |
42 | }
43 |
44 |
--------------------------------------------------------------------------------
/UnitConverter/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "20x20",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "20x20",
11 | "scale" : "3x"
12 | },
13 | {
14 | "size" : "29x29",
15 | "idiom" : "iphone",
16 | "filename" : "Icon-Small@2x.png",
17 | "scale" : "2x"
18 | },
19 | {
20 | "size" : "29x29",
21 | "idiom" : "iphone",
22 | "filename" : "Icon-Small@3x.png",
23 | "scale" : "3x"
24 | },
25 | {
26 | "size" : "40x40",
27 | "idiom" : "iphone",
28 | "filename" : "Icon-Spotlight-40@2x-1.png",
29 | "scale" : "2x"
30 | },
31 | {
32 | "size" : "40x40",
33 | "idiom" : "iphone",
34 | "filename" : "Icon-Spotlight-40@3x.png",
35 | "scale" : "3x"
36 | },
37 | {
38 | "size" : "60x60",
39 | "idiom" : "iphone",
40 | "filename" : "Icon-60@2x.png",
41 | "scale" : "2x"
42 | },
43 | {
44 | "size" : "60x60",
45 | "idiom" : "iphone",
46 | "filename" : "Icon-60@3x.png",
47 | "scale" : "3x"
48 | },
49 | {
50 | "idiom" : "ipad",
51 | "size" : "20x20",
52 | "scale" : "1x"
53 | },
54 | {
55 | "idiom" : "ipad",
56 | "size" : "20x20",
57 | "scale" : "2x"
58 | },
59 | {
60 | "size" : "29x29",
61 | "idiom" : "ipad",
62 | "filename" : "Icon-Small.png",
63 | "scale" : "1x"
64 | },
65 | {
66 | "size" : "29x29",
67 | "idiom" : "ipad",
68 | "filename" : "Icon-Small@2x-1.png",
69 | "scale" : "2x"
70 | },
71 | {
72 | "size" : "40x40",
73 | "idiom" : "ipad",
74 | "filename" : "Icon-Spotlight-40.png",
75 | "scale" : "1x"
76 | },
77 | {
78 | "size" : "40x40",
79 | "idiom" : "ipad",
80 | "filename" : "Icon-Spotlight-40@2x.png",
81 | "scale" : "2x"
82 | },
83 | {
84 | "size" : "76x76",
85 | "idiom" : "ipad",
86 | "filename" : "Icon-76.png",
87 | "scale" : "1x"
88 | },
89 | {
90 | "size" : "76x76",
91 | "idiom" : "ipad",
92 | "filename" : "Icon-76@2x.png",
93 | "scale" : "2x"
94 | },
95 | {
96 | "size" : "83.5x83.5",
97 | "idiom" : "ipad",
98 | "filename" : "Icon-83.5@2x.png",
99 | "scale" : "2x"
100 | }
101 | ],
102 | "info" : {
103 | "version" : 1,
104 | "author" : "xcode"
105 | }
106 | }
--------------------------------------------------------------------------------
/UnitConverter/Base.lproj/LaunchScreen.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/UnitConverter/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
--------------------------------------------------------------------------------
/UnitConverter.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | F9207F501B0C9C1200418CBC /* UnitConverter.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9207F4F1B0C9C1200418CBC /* UnitConverter.swift */; };
11 | F9207F521B0CA6F500418CBC /* TemperatureRange.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9207F511B0CA6F500418CBC /* TemperatureRange.swift */; };
12 | F96E6C991B0698880088267A /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = F96E6C981B0698880088267A /* AppDelegate.swift */; };
13 | F96E6C9B1B0698880088267A /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F96E6C9A1B0698880088267A /* ViewController.swift */; };
14 | F96E6C9E1B0698880088267A /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F96E6C9C1B0698880088267A /* Main.storyboard */; };
15 | F96E6CA01B0698880088267A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F96E6C9F1B0698880088267A /* Images.xcassets */; };
16 | F96E6CA31B0698880088267A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = F96E6CA11B0698880088267A /* LaunchScreen.xib */; };
17 | F96E6CAF1B0698880088267A /* UnitConverterTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F96E6CAE1B0698880088267A /* UnitConverterTests.swift */; };
18 | /* End PBXBuildFile section */
19 |
20 | /* Begin PBXContainerItemProxy section */
21 | F96E6CA91B0698880088267A /* PBXContainerItemProxy */ = {
22 | isa = PBXContainerItemProxy;
23 | containerPortal = F96E6C8B1B0698880088267A /* Project object */;
24 | proxyType = 1;
25 | remoteGlobalIDString = F96E6C921B0698880088267A;
26 | remoteInfo = UnitConverter;
27 | };
28 | /* End PBXContainerItemProxy section */
29 |
30 | /* Begin PBXFileReference section */
31 | F9207F4F1B0C9C1200418CBC /* UnitConverter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UnitConverter.swift; sourceTree = ""; };
32 | F9207F511B0CA6F500418CBC /* TemperatureRange.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TemperatureRange.swift; sourceTree = ""; };
33 | F96E6C931B0698880088267A /* UnitConverter.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = UnitConverter.app; sourceTree = BUILT_PRODUCTS_DIR; };
34 | F96E6C971B0698880088267A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
35 | F96E6C981B0698880088267A /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
36 | F96E6C9A1B0698880088267A /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; };
37 | F96E6C9D1B0698880088267A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
38 | F96E6C9F1B0698880088267A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; };
39 | F96E6CA21B0698880088267A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; };
40 | F96E6CA81B0698880088267A /* UnitConverterTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = UnitConverterTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
41 | F96E6CAD1B0698880088267A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
42 | F96E6CAE1B0698880088267A /* UnitConverterTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UnitConverterTests.swift; sourceTree = ""; };
43 | /* End PBXFileReference section */
44 |
45 | /* Begin PBXFrameworksBuildPhase section */
46 | F96E6C901B0698880088267A /* Frameworks */ = {
47 | isa = PBXFrameworksBuildPhase;
48 | buildActionMask = 2147483647;
49 | files = (
50 | );
51 | runOnlyForDeploymentPostprocessing = 0;
52 | };
53 | F96E6CA51B0698880088267A /* Frameworks */ = {
54 | isa = PBXFrameworksBuildPhase;
55 | buildActionMask = 2147483647;
56 | files = (
57 | );
58 | runOnlyForDeploymentPostprocessing = 0;
59 | };
60 | /* End PBXFrameworksBuildPhase section */
61 |
62 | /* Begin PBXGroup section */
63 | F96E6C8A1B0698880088267A = {
64 | isa = PBXGroup;
65 | children = (
66 | F96E6C951B0698880088267A /* UnitConverter */,
67 | F96E6CAB1B0698880088267A /* UnitConverterTests */,
68 | F96E6C941B0698880088267A /* Products */,
69 | );
70 | sourceTree = "";
71 | };
72 | F96E6C941B0698880088267A /* Products */ = {
73 | isa = PBXGroup;
74 | children = (
75 | F96E6C931B0698880088267A /* UnitConverter.app */,
76 | F96E6CA81B0698880088267A /* UnitConverterTests.xctest */,
77 | );
78 | name = Products;
79 | sourceTree = "";
80 | };
81 | F96E6C951B0698880088267A /* UnitConverter */ = {
82 | isa = PBXGroup;
83 | children = (
84 | F96E6C981B0698880088267A /* AppDelegate.swift */,
85 | F96E6C9A1B0698880088267A /* ViewController.swift */,
86 | F96E6C9C1B0698880088267A /* Main.storyboard */,
87 | F9207F511B0CA6F500418CBC /* TemperatureRange.swift */,
88 | F9207F4F1B0C9C1200418CBC /* UnitConverter.swift */,
89 | F96E6C9F1B0698880088267A /* Images.xcassets */,
90 | F96E6CA11B0698880088267A /* LaunchScreen.xib */,
91 | F96E6C961B0698880088267A /* Supporting Files */,
92 | );
93 | path = UnitConverter;
94 | sourceTree = "";
95 | };
96 | F96E6C961B0698880088267A /* Supporting Files */ = {
97 | isa = PBXGroup;
98 | children = (
99 | F96E6C971B0698880088267A /* Info.plist */,
100 | );
101 | name = "Supporting Files";
102 | sourceTree = "";
103 | };
104 | F96E6CAB1B0698880088267A /* UnitConverterTests */ = {
105 | isa = PBXGroup;
106 | children = (
107 | F96E6CAE1B0698880088267A /* UnitConverterTests.swift */,
108 | F96E6CAC1B0698880088267A /* Supporting Files */,
109 | );
110 | path = UnitConverterTests;
111 | sourceTree = "";
112 | };
113 | F96E6CAC1B0698880088267A /* Supporting Files */ = {
114 | isa = PBXGroup;
115 | children = (
116 | F96E6CAD1B0698880088267A /* Info.plist */,
117 | );
118 | name = "Supporting Files";
119 | sourceTree = "";
120 | };
121 | /* End PBXGroup section */
122 |
123 | /* Begin PBXNativeTarget section */
124 | F96E6C921B0698880088267A /* UnitConverter */ = {
125 | isa = PBXNativeTarget;
126 | buildConfigurationList = F96E6CB21B0698880088267A /* Build configuration list for PBXNativeTarget "UnitConverter" */;
127 | buildPhases = (
128 | F96E6C8F1B0698880088267A /* Sources */,
129 | F96E6C901B0698880088267A /* Frameworks */,
130 | F96E6C911B0698880088267A /* Resources */,
131 | );
132 | buildRules = (
133 | );
134 | dependencies = (
135 | );
136 | name = UnitConverter;
137 | productName = UnitConverter;
138 | productReference = F96E6C931B0698880088267A /* UnitConverter.app */;
139 | productType = "com.apple.product-type.application";
140 | };
141 | F96E6CA71B0698880088267A /* UnitConverterTests */ = {
142 | isa = PBXNativeTarget;
143 | buildConfigurationList = F96E6CB51B0698880088267A /* Build configuration list for PBXNativeTarget "UnitConverterTests" */;
144 | buildPhases = (
145 | F96E6CA41B0698880088267A /* Sources */,
146 | F96E6CA51B0698880088267A /* Frameworks */,
147 | F96E6CA61B0698880088267A /* Resources */,
148 | );
149 | buildRules = (
150 | );
151 | dependencies = (
152 | F96E6CAA1B0698880088267A /* PBXTargetDependency */,
153 | );
154 | name = UnitConverterTests;
155 | productName = UnitConverterTests;
156 | productReference = F96E6CA81B0698880088267A /* UnitConverterTests.xctest */;
157 | productType = "com.apple.product-type.bundle.unit-test";
158 | };
159 | /* End PBXNativeTarget section */
160 |
161 | /* Begin PBXProject section */
162 | F96E6C8B1B0698880088267A /* Project object */ = {
163 | isa = PBXProject;
164 | attributes = {
165 | LastUpgradeCheck = 0710;
166 | ORGANIZATIONNAME = "Your School";
167 | TargetAttributes = {
168 | F96E6C921B0698880088267A = {
169 | CreatedOnToolsVersion = 6.3;
170 | LastSwiftMigration = 0820;
171 | };
172 | F96E6CA71B0698880088267A = {
173 | CreatedOnToolsVersion = 6.3;
174 | LastSwiftMigration = 0820;
175 | TestTargetID = F96E6C921B0698880088267A;
176 | };
177 | };
178 | };
179 | buildConfigurationList = F96E6C8E1B0698880088267A /* Build configuration list for PBXProject "UnitConverter" */;
180 | compatibilityVersion = "Xcode 3.2";
181 | developmentRegion = English;
182 | hasScannedForEncodings = 0;
183 | knownRegions = (
184 | en,
185 | Base,
186 | );
187 | mainGroup = F96E6C8A1B0698880088267A;
188 | productRefGroup = F96E6C941B0698880088267A /* Products */;
189 | projectDirPath = "";
190 | projectRoot = "";
191 | targets = (
192 | F96E6C921B0698880088267A /* UnitConverter */,
193 | F96E6CA71B0698880088267A /* UnitConverterTests */,
194 | );
195 | };
196 | /* End PBXProject section */
197 |
198 | /* Begin PBXResourcesBuildPhase section */
199 | F96E6C911B0698880088267A /* Resources */ = {
200 | isa = PBXResourcesBuildPhase;
201 | buildActionMask = 2147483647;
202 | files = (
203 | F96E6C9E1B0698880088267A /* Main.storyboard in Resources */,
204 | F96E6CA31B0698880088267A /* LaunchScreen.xib in Resources */,
205 | F96E6CA01B0698880088267A /* Images.xcassets in Resources */,
206 | );
207 | runOnlyForDeploymentPostprocessing = 0;
208 | };
209 | F96E6CA61B0698880088267A /* Resources */ = {
210 | isa = PBXResourcesBuildPhase;
211 | buildActionMask = 2147483647;
212 | files = (
213 | );
214 | runOnlyForDeploymentPostprocessing = 0;
215 | };
216 | /* End PBXResourcesBuildPhase section */
217 |
218 | /* Begin PBXSourcesBuildPhase section */
219 | F96E6C8F1B0698880088267A /* Sources */ = {
220 | isa = PBXSourcesBuildPhase;
221 | buildActionMask = 2147483647;
222 | files = (
223 | F9207F521B0CA6F500418CBC /* TemperatureRange.swift in Sources */,
224 | F9207F501B0C9C1200418CBC /* UnitConverter.swift in Sources */,
225 | F96E6C9B1B0698880088267A /* ViewController.swift in Sources */,
226 | F96E6C991B0698880088267A /* AppDelegate.swift in Sources */,
227 | );
228 | runOnlyForDeploymentPostprocessing = 0;
229 | };
230 | F96E6CA41B0698880088267A /* Sources */ = {
231 | isa = PBXSourcesBuildPhase;
232 | buildActionMask = 2147483647;
233 | files = (
234 | F96E6CAF1B0698880088267A /* UnitConverterTests.swift in Sources */,
235 | );
236 | runOnlyForDeploymentPostprocessing = 0;
237 | };
238 | /* End PBXSourcesBuildPhase section */
239 |
240 | /* Begin PBXTargetDependency section */
241 | F96E6CAA1B0698880088267A /* PBXTargetDependency */ = {
242 | isa = PBXTargetDependency;
243 | target = F96E6C921B0698880088267A /* UnitConverter */;
244 | targetProxy = F96E6CA91B0698880088267A /* PBXContainerItemProxy */;
245 | };
246 | /* End PBXTargetDependency section */
247 |
248 | /* Begin PBXVariantGroup section */
249 | F96E6C9C1B0698880088267A /* Main.storyboard */ = {
250 | isa = PBXVariantGroup;
251 | children = (
252 | F96E6C9D1B0698880088267A /* Base */,
253 | );
254 | name = Main.storyboard;
255 | sourceTree = "";
256 | };
257 | F96E6CA11B0698880088267A /* LaunchScreen.xib */ = {
258 | isa = PBXVariantGroup;
259 | children = (
260 | F96E6CA21B0698880088267A /* Base */,
261 | );
262 | name = LaunchScreen.xib;
263 | sourceTree = "";
264 | };
265 | /* End PBXVariantGroup section */
266 |
267 | /* Begin XCBuildConfiguration section */
268 | F96E6CB01B0698880088267A /* Debug */ = {
269 | isa = XCBuildConfiguration;
270 | buildSettings = {
271 | ALWAYS_SEARCH_USER_PATHS = NO;
272 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
273 | CLANG_CXX_LIBRARY = "libc++";
274 | CLANG_ENABLE_MODULES = YES;
275 | CLANG_ENABLE_OBJC_ARC = YES;
276 | CLANG_WARN_BOOL_CONVERSION = YES;
277 | CLANG_WARN_CONSTANT_CONVERSION = YES;
278 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
279 | CLANG_WARN_EMPTY_BODY = YES;
280 | CLANG_WARN_ENUM_CONVERSION = YES;
281 | CLANG_WARN_INT_CONVERSION = YES;
282 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
283 | CLANG_WARN_UNREACHABLE_CODE = YES;
284 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
285 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
286 | COPY_PHASE_STRIP = NO;
287 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
288 | ENABLE_STRICT_OBJC_MSGSEND = YES;
289 | ENABLE_TESTABILITY = YES;
290 | GCC_C_LANGUAGE_STANDARD = gnu99;
291 | GCC_DYNAMIC_NO_PIC = NO;
292 | GCC_NO_COMMON_BLOCKS = YES;
293 | GCC_OPTIMIZATION_LEVEL = 0;
294 | GCC_PREPROCESSOR_DEFINITIONS = (
295 | "DEBUG=1",
296 | "$(inherited)",
297 | );
298 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
299 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
300 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
301 | GCC_WARN_UNDECLARED_SELECTOR = YES;
302 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
303 | GCC_WARN_UNUSED_FUNCTION = YES;
304 | GCC_WARN_UNUSED_VARIABLE = YES;
305 | IPHONEOS_DEPLOYMENT_TARGET = 10.2;
306 | MTL_ENABLE_DEBUG_INFO = YES;
307 | ONLY_ACTIVE_ARCH = YES;
308 | SDKROOT = iphoneos;
309 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
310 | TARGETED_DEVICE_FAMILY = "1,2";
311 | };
312 | name = Debug;
313 | };
314 | F96E6CB11B0698880088267A /* Release */ = {
315 | isa = XCBuildConfiguration;
316 | buildSettings = {
317 | ALWAYS_SEARCH_USER_PATHS = NO;
318 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
319 | CLANG_CXX_LIBRARY = "libc++";
320 | CLANG_ENABLE_MODULES = YES;
321 | CLANG_ENABLE_OBJC_ARC = YES;
322 | CLANG_WARN_BOOL_CONVERSION = YES;
323 | CLANG_WARN_CONSTANT_CONVERSION = YES;
324 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
325 | CLANG_WARN_EMPTY_BODY = YES;
326 | CLANG_WARN_ENUM_CONVERSION = YES;
327 | CLANG_WARN_INT_CONVERSION = YES;
328 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
329 | CLANG_WARN_UNREACHABLE_CODE = YES;
330 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
331 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
332 | COPY_PHASE_STRIP = NO;
333 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
334 | ENABLE_NS_ASSERTIONS = NO;
335 | ENABLE_STRICT_OBJC_MSGSEND = YES;
336 | GCC_C_LANGUAGE_STANDARD = gnu99;
337 | GCC_NO_COMMON_BLOCKS = YES;
338 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
339 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
340 | GCC_WARN_UNDECLARED_SELECTOR = YES;
341 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
342 | GCC_WARN_UNUSED_FUNCTION = YES;
343 | GCC_WARN_UNUSED_VARIABLE = YES;
344 | IPHONEOS_DEPLOYMENT_TARGET = 10.2;
345 | MTL_ENABLE_DEBUG_INFO = NO;
346 | SDKROOT = iphoneos;
347 | TARGETED_DEVICE_FAMILY = "1,2";
348 | VALIDATE_PRODUCT = YES;
349 | };
350 | name = Release;
351 | };
352 | F96E6CB31B0698880088267A /* Debug */ = {
353 | isa = XCBuildConfiguration;
354 | buildSettings = {
355 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
356 | INFOPLIST_FILE = UnitConverter/Info.plist;
357 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
358 | PRODUCT_BUNDLE_IDENTIFIER = "edu.yourschool.$(PRODUCT_NAME:rfc1034identifier)";
359 | PRODUCT_NAME = "$(TARGET_NAME)";
360 | SWIFT_VERSION = 3.0;
361 | };
362 | name = Debug;
363 | };
364 | F96E6CB41B0698880088267A /* Release */ = {
365 | isa = XCBuildConfiguration;
366 | buildSettings = {
367 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
368 | INFOPLIST_FILE = UnitConverter/Info.plist;
369 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
370 | PRODUCT_BUNDLE_IDENTIFIER = "edu.yourschool.$(PRODUCT_NAME:rfc1034identifier)";
371 | PRODUCT_NAME = "$(TARGET_NAME)";
372 | SWIFT_VERSION = 3.0;
373 | };
374 | name = Release;
375 | };
376 | F96E6CB61B0698880088267A /* Debug */ = {
377 | isa = XCBuildConfiguration;
378 | buildSettings = {
379 | BUNDLE_LOADER = "$(TEST_HOST)";
380 | GCC_PREPROCESSOR_DEFINITIONS = (
381 | "DEBUG=1",
382 | "$(inherited)",
383 | );
384 | INFOPLIST_FILE = UnitConverterTests/Info.plist;
385 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
386 | PRODUCT_BUNDLE_IDENTIFIER = "edu.yourschool.$(PRODUCT_NAME:rfc1034identifier)";
387 | PRODUCT_NAME = "$(TARGET_NAME)";
388 | SWIFT_VERSION = 3.0;
389 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/UnitConverter.app/UnitConverter";
390 | };
391 | name = Debug;
392 | };
393 | F96E6CB71B0698880088267A /* Release */ = {
394 | isa = XCBuildConfiguration;
395 | buildSettings = {
396 | BUNDLE_LOADER = "$(TEST_HOST)";
397 | INFOPLIST_FILE = UnitConverterTests/Info.plist;
398 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
399 | PRODUCT_BUNDLE_IDENTIFIER = "edu.yourschool.$(PRODUCT_NAME:rfc1034identifier)";
400 | PRODUCT_NAME = "$(TARGET_NAME)";
401 | SWIFT_VERSION = 3.0;
402 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/UnitConverter.app/UnitConverter";
403 | };
404 | name = Release;
405 | };
406 | /* End XCBuildConfiguration section */
407 |
408 | /* Begin XCConfigurationList section */
409 | F96E6C8E1B0698880088267A /* Build configuration list for PBXProject "UnitConverter" */ = {
410 | isa = XCConfigurationList;
411 | buildConfigurations = (
412 | F96E6CB01B0698880088267A /* Debug */,
413 | F96E6CB11B0698880088267A /* Release */,
414 | );
415 | defaultConfigurationIsVisible = 0;
416 | defaultConfigurationName = Release;
417 | };
418 | F96E6CB21B0698880088267A /* Build configuration list for PBXNativeTarget "UnitConverter" */ = {
419 | isa = XCConfigurationList;
420 | buildConfigurations = (
421 | F96E6CB31B0698880088267A /* Debug */,
422 | F96E6CB41B0698880088267A /* Release */,
423 | );
424 | defaultConfigurationIsVisible = 0;
425 | defaultConfigurationName = Release;
426 | };
427 | F96E6CB51B0698880088267A /* Build configuration list for PBXNativeTarget "UnitConverterTests" */ = {
428 | isa = XCConfigurationList;
429 | buildConfigurations = (
430 | F96E6CB61B0698880088267A /* Debug */,
431 | F96E6CB71B0698880088267A /* Release */,
432 | );
433 | defaultConfigurationIsVisible = 0;
434 | defaultConfigurationName = Release;
435 | };
436 | /* End XCConfigurationList section */
437 | };
438 | rootObject = F96E6C8B1B0698880088267A /* Project object */;
439 | }
440 |
--------------------------------------------------------------------------------