Skip to content

iOS 15 Crash has been fixed.#5000

Open
ekucet wants to merge 1 commit intoChartsOrg:masterfrom
ekucet:iOS15CrashFixed
Open

iOS 15 Crash has been fixed.#5000
ekucet wants to merge 1 commit intoChartsOrg:masterfrom
ekucet:iOS15CrashFixed

Conversation

@ekucet
Copy link

@ekucet ekucet commented Jan 9, 2023

Issue Link 🔗

If you want all the pies to be highlighted in the piechart, you will get an error in ios 15. Cannot convert NSArray to Swift Array.

var highlights: [Highlight] = []
for i in 0 ..< entries.count {
    let highlight = Highlight(x: Double(i), y: Const.highlightYValue, dataSetIndex: Const.highlightDataSetIndex)
    highlights.append(highlight)
}        
pieChartView.highlightValues(highlights)

Used compactMap to cast NSArray to Swift Array.

Goals ⚽

None

Implementation Details 🚧

None

Testing Details 🔍

None

@pmairoldi pmairoldi self-assigned this Mar 11, 2023
@pmairoldi pmairoldi added this to the 5.0.0 milestone Mar 11, 2023
@pmairoldi
Copy link
Collaborator

Needs a reproducible project. You can always map before passing the array to our function.

@pmairoldi pmairoldi modified the milestones: 5.0.0, Future Jun 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants