Commit f8c506a2 authored by shigemi miura's avatar shigemi miura

iPad対応

parent 4cba6656
...@@ -1242,7 +1242,7 @@ ...@@ -1242,7 +1242,7 @@
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
MARKETING_VERSION = 0.9.6; MARKETING_VERSION = 1.0.0;
OTHER_SWIFT_FLAGS = "-D CANARY -D COCOAPODS"; OTHER_SWIFT_FLAGS = "-D CANARY -D COCOAPODS";
PRODUCT_BUNDLE_IDENTIFIER = com.jrc.sailassist.canary; PRODUCT_BUNDLE_IDENTIFIER = com.jrc.sailassist.canary;
PRODUCT_NAME = "Sail Assist"; PRODUCT_NAME = "Sail Assist";
...@@ -1285,7 +1285,7 @@ ...@@ -1285,7 +1285,7 @@
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
MARKETING_VERSION = 0.9.6; MARKETING_VERSION = 1.0.0;
OTHER_SWIFT_FLAGS = "-D COCOAPODS"; OTHER_SWIFT_FLAGS = "-D COCOAPODS";
PRODUCT_BUNDLE_IDENTIFIER = com.jrc.sailassist; PRODUCT_BUNDLE_IDENTIFIER = com.jrc.sailassist;
PRODUCT_NAME = "Sail Assist"; PRODUCT_NAME = "Sail Assist";
...@@ -1471,7 +1471,7 @@ ...@@ -1471,7 +1471,7 @@
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
MARKETING_VERSION = 0.9.6; MARKETING_VERSION = 1.0.0;
OTHER_SWIFT_FLAGS = "-D QC -D COCOAPODS"; OTHER_SWIFT_FLAGS = "-D QC -D COCOAPODS";
PRODUCT_BUNDLE_IDENTIFIER = com.jrc.sailassist.qc; PRODUCT_BUNDLE_IDENTIFIER = com.jrc.sailassist.qc;
PRODUCT_NAME = "Sail Assist"; PRODUCT_NAME = "Sail Assist";
......
...@@ -85,7 +85,7 @@ struct MapTaskView: View { ...@@ -85,7 +85,7 @@ struct MapTaskView: View {
.onAppear{ .onAppear{
let appVersionModel = AppVersionModel() let appVersionModel = AppVersionModel()
appVersionModel.start() appVersionModel.start()
EcaCoordinatesTable().setEcaData() // EcaCoordinatesTable().setEcaData()
} }
.alert("", isPresented: $eca.isShowEcaAlert) { .alert("", isPresented: $eca.isShowEcaAlert) {
if let ecaArea = eca.ecaArea.map({ $0.1 }).filter({ $0.isRunning }).first{ if let ecaArea = eca.ecaArea.map({ $0.1 }).filter({ $0.isRunning }).first{
......
...@@ -31,37 +31,73 @@ struct MainTabView: View { ...@@ -31,37 +31,73 @@ struct MainTabView: View {
appearance.backgroundColor = .clear appearance.backgroundColor = .clear
UITabBar.appearance().scrollEdgeAppearance = appearance UITabBar.appearance().scrollEdgeAppearance = appearance
UITabBar.appearance().standardAppearance = appearance UITabBar.appearance().standardAppearance = appearance
EcaCoordinatesTable().setEcaData()
} }
var body: some View { var body: some View {
@State var isTabShow: Bool = sceneDelegate.tabWindow != nil if UIDevice.current.userInterfaceIdiom == .phone {
@State var isTaskSel: Bool = selectedTabModel.activeTab == .task @State var isTabShow: Bool = sceneDelegate.tabWindow != nil
TabView(selection: $selectedTabModel.activeTab){ @State var isTaskSel: Bool = selectedTabModel.activeTab == .task
TabView(selection: $selectedTabModel.activeTab){
#if CANARY #if CANARY
ChatView() ChatView()
.tag(Tab.chat) .tag(Tab.chat)
#endif #endif
MapRepresentable() MapRepresentable()
.ignoresSafeArea() .ignoresSafeArea()
.tag(Tab.task) .tag(Tab.task)
NotificationView() NotificationView()
.tag(Tab.alert) .tag(Tab.alert)
MenuView(isSignout: $isSignout) MenuView(isSignout: $isSignout)
.tag(Tab.menu) .tag(Tab.menu)
}
.hideNativeTabBar()
.sheet(isPresented: .constant(isTaskSel && isTabShow), content: {
MapTaskView()
.zIndex(0)
.presentationDragIndicator(.hidden)
.presentationDetents([.height(150), .medium, .fraction(0.99)])
.presentationCornerRadius(15)
.presentationBackgroundInteraction(.enabled(upThrough: .medium))
.presentationBackground(ColorSet.BackgroundSecondary.color)
.interactiveDismissDisabled()
})
} else if UIDevice.current.userInterfaceIdiom == .pad {
@State var isPopover: Bool = selectedTabModel.isPoppver
TabView(selection: $selectedTabModel.activeTab){
#if CANARY
ChatView()
.tag(Tab.chat)
#endif
MapRepresentable()
.ignoresSafeArea()
.tag(Tab.task)
NotificationView()
.tag(Tab.alert)
MenuView(isSignout: $isSignout)
.tag(Tab.menu)
}
.hideNativeTabBar()
.popover(isPresented: .constant(isPopover), attachmentAnchor: .point(.bottom), arrowEdge: .bottom) {
MapTaskView()
.presentationCompactAdaptation(.none)
.zIndex(0)
.presentationDragIndicator(.hidden)
.frame(minWidth: 300, maxHeight: 500)
// .frame(minWidth: 0, maxWidth: 300, minHeight: 0, maxHeight: 600, alignment: .center)
// .aspectRatio(contentMode: .fit)
.presentationCornerRadius(15)
.presentationBackgroundInteraction(.enabled(upThrough: .medium))
.presentationBackground(ColorSet.BackgroundSecondary.color)
.interactiveDismissDisabled()
}
} }
.hideNativeTabBar()
.sheet(isPresented: .constant(isTaskSel && isTabShow), content: {
MapTaskView()
.zIndex(0)
.presentationDragIndicator(.hidden)
.presentationDetents([.height(150), .medium, .fraction(0.99)])
.presentationCornerRadius(15)
.presentationBackgroundInteraction(.enabled(upThrough: .medium))
.presentationBackground(ColorSet.BackgroundSecondary.color)
.interactiveDismissDisabled()
})
} }
} }
...@@ -79,6 +115,11 @@ struct CustomTabBar: View { ...@@ -79,6 +115,11 @@ struct CustomTabBar: View {
ForEach(Tab.allCases, id: \.rawValue) { tab in ForEach(Tab.allCases, id: \.rawValue) { tab in
Button(action: { Button(action: {
selectedTabModel.activeTab = tab selectedTabModel.activeTab = tab
if tab == .task {
selectedTabModel.isPoppver.toggle()
} else {
selectedTabModel.isPoppver = false
}
}, label: { }, label: {
VStack{ VStack{
Image(selectedTabModel.activeTab == tab ? tab.rawValue + "_selected" : tab.rawValue) Image(selectedTabModel.activeTab == tab ? tab.rawValue + "_selected" : tab.rawValue)
......
...@@ -12,4 +12,5 @@ class SelectedTabModel: ObservableObject { ...@@ -12,4 +12,5 @@ class SelectedTabModel: ObservableObject {
@Published var activeTab: Tab = .task @Published var activeTab: Tab = .task
@Published var isShowChangeEmrMode: Bool = false @Published var isShowChangeEmrMode: Bool = false
@Published var isLocationAlert: Bool = false @Published var isLocationAlert: Bool = false
@Published var isPoppver: Bool = false
} }
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