Create an interactive star rating SwiftUI component. This article will use the star
cutout shape with rounded corners as well as elements of the custom slider to create
a star rating component in SwiftUI.
There is limited ability to customise the Slider in SwiftUI as of Xcode 13. These are
three options of presenting a custom view of the Slider in a SwiftUI App. Set the
tint color and background color of the slider; fall back to using the UISliderView
from UIKit or create a custom SliderView from scratch in SwiftUI.
The Star shape used in the Star cutout has sharp corners. This article shows how to
modify the shape to create stars with rounded corners. The radius of the corner can
be set as a parameter to specify the rounding of the outer and inner corners of the star.
Path can be used in SwiftUI to create practically any shape. I found creating a
cutout shape difficult until I found that FillStyle can be used with the even-odd
rule. This article shows how to create a shape outline where the outside can be
colored and the center kept transparent to allow other content to show …
One way to animation the change in text size is to use scale effect, however the text
will appear blurred when scaled up. A custom AnimatableModifier can be used to
smoothly animate the resizing of text in SwiftUI, which results in displaying clear
text at all sizes through the animation.
Roman numerals, from ancient Rome are a way of writing numbers using these letters
from the latin alphabet [I, V, X, L, C, D and M]. Each letter has a fixed integer
value and can be combined to represent any number from 1 to 3999. This article
demonstrates how to convert a integer to the Roman Numeral representation.
A line chart is a graphical representation of changes in some data over time or
between categories. The chart consists of two axes; x-axis is the horizontal axis
representing the time change; and y-axis is the vertical axis representing the
magnitude of the data. This article demonstrates how to create simple line …
This is the fourth part in this trilogy! - with a brief interlude last week for an
introduction to the Minimax algorithm. This article builds on the App from part 1
and 2, which allows two players to play Tic Tac Toe. In this article we will
implement the minimax algorithm to determin the best move for the computer to …
The Minimax algorithm is a type of backtracking algorithm used in Game Theory to
determine the best move to make assuming your opponent is also making their best
move. The use of Minimax algorithm is a form of Artificial Intelligence that does not
involve Machine Learning. This article explains Minimax algorithm and …
This creates the View for Tic Tac Toe app utilising the Model and ViewModel created
in part 1. More unit tests are added as functionality is required and then the code
to get the tests to pass is implemented.