You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Keeps on crashing the app , what am I missing here???
this is where it crashes:
internal func setPlotPointPositions(forNewlyActivatedPoints activatedPoints: [Int], withData data: [Double]) {
var index = 0
for activatedPointIndex in activatedPoints {
let dataPosition = index
let value = data[dataPosition]
let newPosition = graphViewDrawingDelegate.calculatePosition(atIndex: activatedPointIndex, value: value)
graphPoints[activatedPointIndex].x = newPosition.x. <<<<------ right here
graphPoints[activatedPointIndex].y = newPosition.y
index += 1
}
}
error: Thread 1: Fatal error: Index out of range
on initial load , no issues.
every time a child is added to firebase it updates a collection view and the scrollable graph
but it crashes every time:
here is my code:
Hi, I'm having this issue too. I have gotten around it by drawing the graph each time I add a datapoint. However, you need to ensure that you remove the graph view before adding the subview again.
You can do this by adding the following code to the top of the draw graph function. for view in graphContainer.subviews { view.removeFromSuperview() }
i see, I have tried that . alas nothing does it... keeps on crashing every single time a new entry is added to firebase data base ... I ll go with something else ... cause it s not viable but thank you
Keeps on crashing the app , what am I missing here???
this is where it crashes:
internal func setPlotPointPositions(forNewlyActivatedPoints activatedPoints: [Int], withData data: [Double]) {
error: Thread 1: Fatal error: Index out of range
on initial load , no issues.
every time a child is added to firebase it updates a collection view and the scrollable graph
but it crashes every time:
here is my code:
override func viewDidLoad() {
super.viewDidLoad()
func fetchDatasBmiHistory() {
if shared.currentUser == nil {
return
}
}
}
func value(forPlot plot: Plot, atIndex pointIndex: Int) -> Double {
switch(plot.identifier) {
case "bmi":
return shared.bmiArray[pointIndex].bmi ?? 20
default:
return 0
}
}
The text was updated successfully, but these errors were encountered: