From ea1e979efff39338f8140c41c8291c5e9556d6d4 Mon Sep 17 00:00:00 2001 From: Kevin Glover Date: Fri, 12 Feb 2016 14:47:59 +0000 Subject: [PATCH] Fix codes not getting saved --- Artcodes/Info.plist | 4 ++-- .../src/view/ActionEditViewController.swift | 24 +++++++------------ 2 files changed, 10 insertions(+), 18 deletions(-) diff --git a/Artcodes/Info.plist b/Artcodes/Info.plist index 819e6e5..afa8516 100644 --- a/Artcodes/Info.plist +++ b/Artcodes/Info.plist @@ -37,7 +37,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 3.0.2 + 3.0.3 CFBundleSignature ???? CFBundleURLTypes @@ -60,7 +60,7 @@ CFBundleVersion - 218 + 219 LSRequiresIPhoneOS NSAppTransportSecurity diff --git a/Artcodes/src/view/ActionEditViewController.swift b/Artcodes/src/view/ActionEditViewController.swift index bfd6cd1..6a1a7e4 100644 --- a/Artcodes/src/view/ActionEditViewController.swift +++ b/Artcodes/src/view/ActionEditViewController.swift @@ -169,24 +169,16 @@ class ActionEditViewController: UIViewController, UITextFieldDelegate action.url = nil } } - else + else if textField.keyboardType == .NumbersAndPunctuation { - + if action.codes.count > (textField.tag - 1) && textField.tag != 0 + { + if let code = textField.text + { + action.codes[textField.tag - 1] = code + } + } } - // else if textField == actionCode - // { - // if let code = textFromField(textField) - // { - // if action.codes.count > 0 - // { - // action.codes[0] = code - // } - // else - // { - // action.codes.append(code) - // } - // } - // } } func createCodeEdits()