Final training project from 100 Days SwiftUI Course. Thanks a lot Paul Hudson for amazing course for beginners.
You need to build an app that helps users roll dice then store the results they had.
For starters, I connected Core Data to store information about all the throws that were made in the game. Created a button in the Navigation Bar, which opens a sheet with the configuration of our dice, there you can choose their quantity and color.
Next, I used icons from the library of iconography SF Symbols to give the dice their own appearance. To get the dice to move by touch, I used gesture to my view. To achieve an approximate 3D effect I applied rotation3DEffect which made the dice slightly convex in shape.
Further, when the animation set the dice in motion, I quickly and discreetly changed the icon to another random value to give the throw reality and meaning. After a roll of the dice, the results are written to the database and displayed on the results view.
Part of the game interface of a craps app called Learn Craps Yo FREE. Thanks to Mike Land for the SwiftUI development contract.
January 10, 2022
Learn More