From c1d4c5f5dcdb9ef492a3da650572adff0f88d053 Mon Sep 17 00:00:00 2001 From: "Pfeil, Scott Robert" Date: Thu, 9 Jul 2020 11:12:15 -0400 Subject: [PATCH] long press improve --- JSONCreator_iOS/JSONCreator/AppDelegate.swift | 8 +++++--- JSONCreator_iOS/JSONCreator/JSON/Molecules/BarsPager.json | 2 +- .../JSONCreator/JSON/Samples/MVA3.0/carousel.json | 5 ++++- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/JSONCreator_iOS/JSONCreator/AppDelegate.swift b/JSONCreator_iOS/JSONCreator/AppDelegate.swift index 45443d9..ab1c091 100644 --- a/JSONCreator_iOS/JSONCreator/AppDelegate.swift +++ b/JSONCreator_iOS/JSONCreator/AppDelegate.swift @@ -54,9 +54,11 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UISplitViewControllerDele return true } - @objc func pasteAndGo() { - (dvc as? DetailViewController)?.textView.text = UIPasteboard.general.string - (dvc as? DetailViewController)?.play() + @objc func pasteAndGo(_ sender: UILongPressGestureRecognizer) { + if sender.state == .ended { + (dvc as? DetailViewController)?.textView.text = UIPasteboard.general.string + (dvc as? DetailViewController)?.play() + } } func applicationWillResignActive(_ application: UIApplication) { diff --git a/JSONCreator_iOS/JSONCreator/JSON/Molecules/BarsPager.json b/JSONCreator_iOS/JSONCreator/JSON/Molecules/BarsPager.json index 05dcfe8..78f9e58 100644 --- a/JSONCreator_iOS/JSONCreator/JSON/Molecules/BarsPager.json +++ b/JSONCreator_iOS/JSONCreator/JSON/Molecules/BarsPager.json @@ -1 +1 @@ -"moleculeName":"barsPager" +"moleculeName":"barsCarouselIndicator" diff --git a/JSONCreator_iOS/JSONCreator/JSON/Samples/MVA3.0/carousel.json b/JSONCreator_iOS/JSONCreator/JSON/Samples/MVA3.0/carousel.json index d1eded8..c434d01 100644 --- a/JSONCreator_iOS/JSONCreator/JSON/Samples/MVA3.0/carousel.json +++ b/JSONCreator_iOS/JSONCreator/JSON/Samples/MVA3.0/carousel.json @@ -25,6 +25,9 @@ "molecule":{ "moleculeName" : "carousel", "loop":true, + "pagingMolecule": { + "moleculeName":"barsCarouselIndicator" + }, "molecules" : [ { "moleculeName" : "carouselItem", @@ -47,7 +50,7 @@ "backgroundColor":"green", "molecule" : { "moleculeName" : "label", - "text" : "2" + "text" : "3" } } ],