move project location, fix textview capitalization

This commit is contained in:
panxi 2019-11-25 11:42:38 -05:00
parent 775139401a
commit faf98a135d
2 changed files with 5 additions and 2 deletions

View File

@ -2,10 +2,10 @@
<Workspace
version = "1.0">
<FileRef
location = "group:mvm_core_ui/MVMCoreUI.xcodeproj">
location = "group:mvm_core/MVMCore/MVMCore.xcodeproj">
</FileRef>
<FileRef
location = "group:mvm_core/MVMCore/MVMCore.xcodeproj">
location = "group:mvm_core_ui/MVMCoreUI.xcodeproj">
</FileRef>
<FileRef
location = "group:JSONCreator_iOS/JSONCreator.xcodeproj">

View File

@ -34,6 +34,7 @@ class DetailViewController: UIViewController {
textView.smartDashesType = .no
textView.smartQuotesType = .no
textView.smartInsertDeleteType = .no
textView.autocapitalizationType = .none
let shareButton = UIBarButtonItem(barButtonSystemItem: .action, target: self, action: #selector(shareButtonPressed))
let buildButton = UIBarButtonItem(barButtonSystemItem: .play, target: self, action: #selector(play))
@ -56,7 +57,9 @@ class DetailViewController: UIViewController {
@objc func play() {
do {
let decoder = JSONDecoder()
if let data = textView.text.data(using: .utf8), let jsonObject = try JSONSerialization.jsonObject(with: data, options: []) as? [AnyHashable: Any] {
let pageModel = try decoder.decode(PageModel.self, from: data)
let page = jsonObject.optionalDictionaryForKey(KeyPage)
let pageType = page?.optionalStringForKey(KeyPageType)
let template = page?.optionalStringForKey("template")