以下の内容はhttps://techblog.spiderplus.co.jp/iosdc2024-bookmarkより取得しました。


クリアしおりのコード - iOSDC Japan 2024 ボックスノベルティ

クリアしおりのコード

iOSDC Japan 2024のボックスノベルティのクリアしおりのSwiftUIのコードです。
ボックスノベルティの紹介記事については下記をご覧ください。 techblog.spiderplus.co.jp

SwiftUIのコード

//
//  ContentView.swift
//  ShioriDesignApp
//
//  Created by SpiderPlus on 2024/06/12.
//  Copyright © 2024 SpiderPlus & Co. All rights reserved.
//

import SwiftUI

struct ContentView: View {
    var body: some View {
        NavigationStack {
            List{
                NavigationLink(destination: shioriView) {
                    Text("SwiftUI完全に理解した")
                        .foregroundStyle(.black)
                }
            }
            .navigationTitle("iOSDC Japan 2024")
        }.tint(.black)
    }
    
    var shioriView: some View {
        VStack(alignment: .center, spacing: 50) {

            ZStack(){
                Rectangle()
                    .stroke(lineWidth: 4.0)
                    .clipShape(.rect(cornerRadius: 5.0))
                    .frame(maxHeight: 150)
                    .padding(30)
                Text("SwiftUI完全に理解した")
                    .font(.largeTitle)
                    .bold()
                    .foregroundColor(.black)
            }.padding(30)

            Text("SpiderPlus & Co.")
                .frame(maxWidth: .infinity)
                .font(.largeTitle)
                .foregroundColor(.white)
                .padding()
                .background(.black)
        }
    }
}

#Preview {
    ContentView()
}

Xcode上のPreview

Xcode上のPreview




以上の内容はhttps://techblog.spiderplus.co.jp/iosdc2024-bookmarkより取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14