サンプル素材
Kjpargeter - jp.freepik.com によって作成された background ベクトル
タイトル画像の表示方法
実装
import SwiftUI
struct ContentView: View {
+ init() {
+ let appearance = UINavigationBarAppearance()
+ appearance.backgroundImage = UIImage(named: "12133")
+ UINavigationBar.appearance().standardAppearance = appearance
+ UINavigationBar.appearance().compactAppearance = appearance
+ UINavigationBar.appearance().scrollEdgeAppearance = appearance
+ }
var body: some View {
NavigationView {
Text("Hello, world!")
+ .navigationBarTitleDisplayMode(.inline)
}
}
}
完成系
おわり
結構やり方迷いました