Apple introduced SwiftUI Charts at WWWDC 2022, which makes it incredibly easy to
create charts within SwiftUI views. The default chart presents the entire data in the
chart plot regardless of how much data is available. It can be beneficial to show
more details on a chart and add the ability to scroll through the …
Apple introduced NavigationStack and NavigationSplitView at WWWDC 2022 to replace
NavigationView, which has been deprecated. The documentation for NavigationSplitView
includes sample code, but the code does not work as it is missing model data. Here is
some model data to allow the sample code in the documentation to …
There are times when data in a bar chart has similar values for a number of the bars
and it can be difficult to see the differences. One option is to zoom in on the top
section of the bar chart. This article investigates a number of options and
identifies the best approach for this in Swift Charts.
I came across the Matthew effect recently, which struck me as very unfair so I
wondered if I could reproduce the results demonstrated. This article outlines the
Swift code for an app to test the redistribution of coins in a closed population
based on random coin tosses between agents in the population.
A Slider control is a UI control that allows the user to select a value from within a
range of values. In SwiftUI, it is usually presented as a thumb selector on a linear
line. There are times when it might be better to present this type of selector as a
circle with the thumb moving around the circumference. This …
At WWWDC 2022, Apple introduced SwiftUI Charts, which makes it easy to create
various charts within SwiftUI views. This article demonstrates how to quickly create
a bar chart and customise the chart containing multiple sets of data.