move project location, fix textview capitalization
This commit is contained in:
parent
775139401a
commit
faf98a135d
4
JSONCreator.xcworkspace/contents.xcworkspacedata
generated
4
JSONCreator.xcworkspace/contents.xcworkspacedata
generated
@ -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">
|
||||
|
||||
@ -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")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user