Commit 884ca2d0 authored by sugita mamoru's avatar sugita mamoru

InformationView画面だけ作成

parent 4abc4c34
......@@ -32,6 +32,7 @@
020B98692ADD221E0029DE4C /* Preferences.swift in Sources */ = {isa = PBXBuildFile; fileRef = 020B98682ADD221D0029DE4C /* Preferences.swift */; };
020B986C2ADD3E810029DE4C /* InTextLib.swift in Sources */ = {isa = PBXBuildFile; fileRef = 020B986B2ADD3E810029DE4C /* InTextLib.swift */; };
020B986E2ADD3E8D0029DE4C /* DateTextLib.swift in Sources */ = {isa = PBXBuildFile; fileRef = 020B986D2ADD3E8D0029DE4C /* DateTextLib.swift */; };
0210CF302B3A8FE800968F33 /* MenuInfomarionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0210CF2F2B3A8FE800968F33 /* MenuInfomarionView.swift */; };
022789002AE1FE4600A87787 /* MapboxCommon.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 022788F92AE1FE3D00A87787 /* MapboxCommon.xcframework */; };
022789012AE1FE4600A87787 /* MapboxCommon.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 022788F92AE1FE3D00A87787 /* MapboxCommon.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
022789022AE1FE4700A87787 /* MapboxCoreMaps.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 022788F82AE1FE3D00A87787 /* MapboxCoreMaps.xcframework */; };
......@@ -186,6 +187,7 @@
020B98682ADD221D0029DE4C /* Preferences.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Preferences.swift; sourceTree = "<group>"; };
020B986B2ADD3E810029DE4C /* InTextLib.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = InTextLib.swift; sourceTree = "<group>"; };
020B986D2ADD3E8D0029DE4C /* DateTextLib.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DateTextLib.swift; sourceTree = "<group>"; };
0210CF2F2B3A8FE800968F33 /* MenuInfomarionView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = MenuInfomarionView.swift; path = Sailassist/Menu/View/MenuInfomarionView.swift; sourceTree = SOURCE_ROOT; };
022788F62AE1FE3C00A87787 /* MapboxMobileEvents.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = MapboxMobileEvents.xcframework; sourceTree = "<group>"; };
022788F72AE1FE3C00A87787 /* Turf.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = Turf.xcframework; sourceTree = "<group>"; };
022788F82AE1FE3D00A87787 /* MapboxCoreMaps.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = MapboxCoreMaps.xcframework; sourceTree = "<group>"; };
......@@ -611,6 +613,7 @@
D5E008752B2ADD5900C4070A /* MenuManualRADARView.swift */,
D5E008772B2B022200C4070A /* MenuAboutAppView.swift */,
D54D174A2B35137A00A0EAA5 /* LocalWebView.swift */,
0210CF2F2B3A8FE800968F33 /* MenuInfomarionView.swift */,
);
path = View;
sourceTree = "<group>";
......@@ -996,6 +999,7 @@
D545FC762B09C81300F206D0 /* PushNotificationTypes.swift in Sources */,
D5E008742B2ADD3F00C4070A /* MenuManualECDISView.swift in Sources */,
D545FC742B09C74300F206D0 /* AlertManager.swift in Sources */,
0210CF302B3A8FE800968F33 /* MenuInfomarionView.swift in Sources */,
020B98692ADD221E0029DE4C /* Preferences.swift in Sources */,
02CD06932AE88970005F8D8F /* ServerSession.swift in Sources */,
02A1DE312AFB61D8005BCF55 /* MyChatContentView.swift in Sources */,
......
......@@ -21,7 +21,7 @@ enum MenuPath: String, Hashable{
case ManualInmalsatC
case ManualInternationalVHF
case ManualVDR
// case Information
case Information
case Setting
case GpsSelect
case Help
......@@ -53,8 +53,8 @@ enum MenuPath: String, Hashable{
"International VHF"
case .ManualVDR:
"VDR"
// case .Information:
// "Information"
case .Information:
"Information"
case .Setting:
"Setting"
case .GpsSelect:
......@@ -138,11 +138,11 @@ struct MenuView: View {
MenuContentView(content: .Manual)
}
// Button{
// path.append(.Information)
// }label: {
// MenuContentView(content: .Information)
// }
Button{
path.append(.Information)
}label: {
MenuContentView(content: .Information)
}
Button{
path.append(.Setting)
......@@ -180,6 +180,9 @@ struct MenuView: View {
}else if goto == .AboutApp{
MenuAboutAppView(path: $path)
.navigationBarHidden(true)
}else if goto == .Information{
MenuInfomarionView(path: $path)
.navigationBarHidden(true)
}else{
VStack(spacing: 0) {
MenuTitleView(path: $path, title: goto.title)
......
//
// MenuInfomarionView.swift
// Sailassist
//
// Created by Mamoru Sugita on 2023/12/26.
//
import SwiftUI
struct MenuInfomarionView: View {
@Binding var path : [MenuPath]
var body: some View {
VStack{
MenuTitleView(path: $path, title: MenuPath.Information.title)
ScrollView{
VStack(spacing: 0){
InformationView(title: "半角文字", bodyStr: String(repeating: halfString, count: 157))
InformationView(title: "全角文字", bodyStr: String(repeating: halfString2, count: 82))
}
.padding()
.background(.black)
}
}
}
private struct InformationView: View {
var title: String
var bodyStr: String
@State var isExtend = false
var body: some View {
VStack(alignment: .leading, spacing: 0){
HStack{
Text(title)
.foregroundColor(.white)
Spacer()
Button {
isExtend.toggle()
} label: {
Image(systemName: isExtend ? "plus" : "minus")
.foregroundColor(.white)
}
}
.padding()
.background(.gray)
if isExtend {
Text(bodyStr)
.multilineTextAlignment(.leading)
.padding(EdgeInsets(top: 5, leading: 10, bottom: 5, trailing: 10))
}
}
.background(.white)
}
}
}
#Preview {
MenuInfomarionView(path: .constant([]))
}
let halfString = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
let halfString2 = "あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわをん"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment