This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
struct ContentView: View { | |
/// カスタムフォントサイズ | |
@ScaledMetric private var fontSize: CGFloat = 30.0 | |
/// カスタム画像サイズ | |
@ScaledMetric private var imageSize: CGFloat = 50.0 | |
/// カスタム余白 | |
@ScaledMetric private var padding: CGFloat = 10.0 | |
/// カスタム角度 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
struct ContentView: View { | |
var body: some View { | |
TabView { | |
VStack { | |
Text("Assets.xcassetsでAccentColorに赤を指定") | |
.padding() | |
Button("ボタン(色指定なし)", action: {}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
@main | |
struct PetShopApp: App { | |
/// ペットショップ | |
@StateObject private var shop: PetShop = .init() | |
var body: some Scene { | |
WindowGroup { | |
ContentView(shop: shop) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
/// エフェクト情報 | |
struct SlotEffects { | |
var saturation: Double = 0.0 | |
var hueShift: Double = 0.0 | |
var bloom: Double = 0.0 | |
} | |
/// 写真情報 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
/// 犬の種類 | |
enum Dog { | |
/// 秋田犬 | |
case akitainu | |
/// 甲斐犬 | |
case kaiken | |
/// 名前 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
struct ContentView: View { | |
/// ViewModel | |
@ObservedObject var viewModel = ContentViewModel(selection: .circle, isPresented: false) | |
/// 一つ前のタブ | |
/// シートが閉じた時に選択していたタブに戻る際に利用 | |
@State var oldSelection: Tab = .circle | |
var body: some View { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
struct ContentView: View { | |
var body: some View { | |
VStack { | |
Text("ドッグマッチングアプリ") | |
.font(.subheadline) | |
.opacity(0.8) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
struct ContentView: View { | |
// 進捗 | |
@State private var progress: Float = 0.3 | |
var body: some View { | |
VStack { | |
// 進捗ビュー (青) | |
CircleProgressView(progress: $progress, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"name" = "Great Dane"; | |
"favoriteButton" = "Favorite"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
struct ContentView: View { | |
@State private var selection: Tab = .circle | |
var body: some View { | |
TabView(selection: $selection) { | |
Text("丸のビュー") | |
.tabItem { |
NewerOlder