I discovered a bug in the game I had written on Tic Tac Toe. When the board is in a
certain state, the system did not take the obvious winning move. It still won the
game, but with an extra move required. This article details how to write a failing
unit test to reproduce the issue and how to update the minimax …
It is said that use of Canvas to create complex shapes can provide better performance
in SwiftUI. This article compares performance of scrolling through multiple instances
of the same card pattern created using shape, canvas or image.
I discovered, when playing around with the rounded-corner star shape, that the same
basic shape could be used to create a cog shape. This article demonstrates the
creation of the cog shape and the use of timelineview to animate its rotation in
TimelineView, introduced in iOS 15, can be used to change objects on a canvas over
time. The article takes the star shape defined previously and animates rotating the
star shape on the canvas in a SwiftUI view.