changeset 72:552963ee4dc4

Fixing: Modifying state during view update
author Dennis Concepción Martín <66180929+denniscm190@users.noreply.github.com>
date Sat, 08 May 2021 19:06:00 +0200
parents c37c93ba3f37
children cc59a30661f7
files Sources/StockCharts/LineChart/Helpers/LinePath.swift StockCharts.xcodeproj/project.xcworkspace/xcuserdata/dennis.xcuserdatad/UserInterfaceState.xcuserstate
diffstat 2 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/Sources/StockCharts/LineChart/Helpers/LinePath.swift	Sat May 08 18:48:49 2021 +0200
+++ b/Sources/StockCharts/LineChart/Helpers/LinePath.swift	Sat May 08 19:06:00 2021 +0200
@@ -31,14 +31,16 @@
             }
 
             // Append current point to an array. Later will be used for Drag Gesture
-            pathPoints.append(path.currentPoint!)
+            DispatchQueue.main.async {
+                pathPoints.append(path.currentPoint!)
+            }
         }
         
-        self.pathPoints = pathPoints
-        
         return path
     }
     
+//    public func test
+    
     /*
      Get data -> normalize it -> 0 <= output <= 1
      */
Binary file StockCharts.xcodeproj/project.xcworkspace/xcuserdata/dennis.xcuserdatad/UserInterfaceState.xcuserstate has changed