This function was announced in Chiba.swift #1 and an enhanced version was released as SymbolKit
in Kanagawa.swift #1.
SymbolKit
provides a quiz feature using SwiftUI Path.
The example below shows the custom path indicating Enoshima with animation.
SymbolQuizView(
titleContent: {
Text("神奈川シンボルクイズ第5問")
.font(.largeFont)
.foregroundStyle(.themeColor)
}, answerPrefixContent: {
Text("正解:")
.font(.midiumFont)
.foregroundStyle(.defaultForegroundColor)
}, answerContent: {
Text("江ノ島")
.font(.largeFont)
.foregroundStyle(.strokeColor)
}, showAnswerContent: {
Text("正解を表示")
.font(.midiumFont)
.foregroundStyle(.defaultForegroundColor)
}, answerHintContent: {
Text(answerHint ?? "")
.font(.midiumFont)
.foregroundStyle(.defaultForegroundColor)
},
shape: EnoshimaShape(),
// Set Path Aspect ratio
shapeAspectRatio: 990 / 617
)
SymbolQuizView
has custom shortcuts.
Space
-> start / stop path animationCmd
+u
-> show incorrect mark(❌)Cmd
+c
-> show correct mark(⭕️)
This project depends on Hefty Reward Single Line Font.
This font is allowed only for personal use, not for any commercial use.