Relative Content

Tag Archive for swiftswiftui

Swift onChange event of FamilyActivityPicker not firing

I’m playing around with some swift development for the first time in quite a few years and the language has changed some what with swiftui. I’ve been following a few different tutorials and I think I might be muddling up some ways of doing things.

Swift onChange event of FamilyActivityPicker not firing

I’m playing around with some swift development for the first time in quite a few years and the language has changed some what with swiftui. I’ve been following a few different tutorials and I think I might be muddling up some ways of doing things.

How to set axis order in AxisMarks in SwiftUI Chart view

My app displays a chart using LineMarks. I want my Y axis to have at the bottom 0, and at the top 15. Like this: Correct Y axis
This works fine unless all the values are 0, in which case the Y axis is inversed: Inversed Y axis

Sheet `Implicitly Unwrapped Optional`

How come the sheet throws an Implicitly Unwrapped Optional error when the button is pressed?
To me it looks like I’m assigning selectedNumber to i and then using it in the sheet, is there a step I’m missing where selectedNumber is reset to nil?