diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..482e245
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+.DS_Store
+xcuserdata
+
diff --git a/ToDoList.xcodeproj/project.pbxproj b/ToDoList.xcodeproj/project.pbxproj
old mode 100644
new mode 100755
index 2c5db07..4d87c49
--- a/ToDoList.xcodeproj/project.pbxproj
+++ b/ToDoList.xcodeproj/project.pbxproj
@@ -181,6 +181,7 @@
TargetAttributes = {
954D24811B7A2DDA00DD9E4E = {
CreatedOnToolsVersion = 6.4;
+ DevelopmentTeam = TXV64D6H4A;
};
954D24961B7A2DDA00DD9E4E = {
CreatedOnToolsVersion = 6.4;
@@ -367,10 +368,12 @@
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ DEVELOPMENT_TEAM = TXV64D6H4A;
INFOPLIST_FILE = ToDoList/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.purecreek.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_VERSION = 4.2;
};
name = Debug;
};
@@ -378,10 +381,12 @@
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ DEVELOPMENT_TEAM = TXV64D6H4A;
INFOPLIST_FILE = ToDoList/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.purecreek.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_VERSION = 4.2;
};
name = Release;
};
diff --git a/ToDoList.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/ToDoList.xcodeproj/project.xcworkspace/contents.xcworkspacedata
old mode 100644
new mode 100755
diff --git a/ToDoList.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ToDoList.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644
index 0000000..18d9810
--- /dev/null
+++ b/ToDoList.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
+
+
+
+
+ IDEDidComputeMac32BitWarning
+
+
+
diff --git a/ToDoList.xcodeproj/xcuserdata/matteo.xcuserdatad/xcschemes/ToDoList.xcscheme b/ToDoList.xcodeproj/xcuserdata/matteo.xcuserdatad/xcschemes/ToDoList.xcscheme
old mode 100644
new mode 100755
diff --git a/ToDoList.xcodeproj/xcuserdata/matteo.xcuserdatad/xcschemes/xcschememanagement.plist b/ToDoList.xcodeproj/xcuserdata/matteo.xcuserdatad/xcschemes/xcschememanagement.plist
old mode 100644
new mode 100755
diff --git a/ToDoList/AddToDoItemViewController.swift b/ToDoList/AddToDoItemViewController.swift
old mode 100644
new mode 100755
index 7135444..8b24afe
--- a/ToDoList/AddToDoItemViewController.swift
+++ b/ToDoList/AddToDoItemViewController.swift
@@ -14,16 +14,16 @@ class AddToDoItemViewController: UIViewController {
@IBOutlet weak var nameTextField: UITextField!
var stateController: StateController?
-
- override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
- guard let tappedButton = sender as? UIBarButtonItem where tappedButton != cancelButton else {
- return;
- }
- guard let text = nameTextField.text else {
- return
- }
- let todoItem = ToDoItem(name: text, completed: false, creationDate: NSDate())
- stateController?.addItem(todoItem)
- }
-
+
+ override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
+ guard let tappedButton = sender as? UIBarButtonItem, tappedButton != cancelButton else {
+ return;
+ }
+ guard let text = nameTextField.text else {
+ return
+ }
+ let todoItem = ToDoItem(name: text, completed: false, creationDate: NSDate())
+ stateController?.addItem(item: todoItem)
+ }
+
}
diff --git a/ToDoList/AppDelegate.swift b/ToDoList/AppDelegate.swift
old mode 100644
new mode 100755
index a8fc973..123692f
--- a/ToDoList/AppDelegate.swift
+++ b/ToDoList/AppDelegate.swift
@@ -14,19 +14,21 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
let stateController = StateController()
- func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
- if let navigationController = window?.rootViewController as? UINavigationController,
- let toDoListTableViewController = navigationController.viewControllers.first as? ToDoListTableViewController {
- toDoListTableViewController.stateController = stateController
- }
- return true
- }
+ func application(_ application: UIApplication,
+ didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool
+ {
+ if let navigationController = window?.rootViewController as? UINavigationController,
+ let toDoListTableViewController = navigationController.viewControllers.first as? ToDoListTableViewController {
+ toDoListTableViewController.stateController = stateController
+ }
+ return true
+ }
- func applicationWillTerminate(application: UIApplication) {
+ func applicationWillTerminate(_ application: UIApplication) {
stateController.save()
}
- func applicationWillResignActive(application: UIApplication) {
+ func applicationWillResignActive(_ application: UIApplication) {
stateController.save()
}
}
diff --git a/ToDoList/Base.lproj/LaunchScreen.xib b/ToDoList/Base.lproj/LaunchScreen.xib
old mode 100644
new mode 100755
diff --git a/ToDoList/Base.lproj/Main.storyboard b/ToDoList/Base.lproj/Main.storyboard
old mode 100644
new mode 100755
index 412879e..6409ce8
--- a/ToDoList/Base.lproj/Main.storyboard
+++ b/ToDoList/Base.lproj/Main.storyboard
@@ -1,8 +1,12 @@
-
-
+
+
+
+
+
-
-
+
+
+
@@ -10,7 +14,7 @@
-
+
@@ -26,16 +30,19 @@
-
+
-
+
+
+