remove test code
This commit is contained in:
parent
faf98a135d
commit
4d0e3b651e
@ -57,9 +57,7 @@ class DetailViewController: UIViewController {
|
|||||||
|
|
||||||
@objc func play() {
|
@objc func play() {
|
||||||
do {
|
do {
|
||||||
let decoder = JSONDecoder()
|
|
||||||
if let data = textView.text.data(using: .utf8), let jsonObject = try JSONSerialization.jsonObject(with: data, options: []) as? [AnyHashable: Any] {
|
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 page = jsonObject.optionalDictionaryForKey(KeyPage)
|
||||||
let pageType = page?.optionalStringForKey(KeyPageType)
|
let pageType = page?.optionalStringForKey(KeyPageType)
|
||||||
let template = page?.optionalStringForKey("template")
|
let template = page?.optionalStringForKey("template")
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user