Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions ComfortableMove/ComfortableMove.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@
/* End PBXFileSystemSynchronizedBuildFileExceptionSet section */

/* Begin PBXFileSystemSynchronizedRootGroup section */
804966C02E8B87F7004590A7 /* ComfortableMoveTest */ = {
isa = PBXFileSystemSynchronizedRootGroup;
path = ComfortableMoveTest;
sourceTree = "<group>";
};
8070624E2E7A7714004D496D /* ComfortableMove */ = {
isa = PBXFileSystemSynchronizedRootGroup;
exceptions = (
Expand Down Expand Up @@ -70,7 +65,6 @@
isa = PBXGroup;
children = (
8070624E2E7A7714004D496D /* ComfortableMove */,
804966C02E8B87F7004590A7 /* ComfortableMoveTest */,
8070624D2E7A7714004D496D /* Products */,
);
sourceTree = "<group>";
Expand Down Expand Up @@ -100,9 +94,6 @@
dependencies = (
804966C42E8B87F7004590A7 /* PBXTargetDependency */,
);
fileSystemSynchronizedGroups = (
804966C02E8B87F7004590A7 /* ComfortableMoveTest */,
);
name = ComfortableMoveTest;
packageProductDependencies = (
);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0xCB",
"green" : "0xC0",
"red" : "0xFF"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0xCB",
"green" : "0xC0",
"red" : "0xFF"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"images" : [
{
"filename" : "Help Page 1.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Help Page(New).png",
"idiom" : "universal",
"scale" : "2x"
},
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "Help Page2 (1).png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "RatioFixHelpPage1.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Ratio Fix Help Page.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ class BusStopService {

private init() {}

/// 위치 기반 주변 정류소 조회
func getNearbyStations(location: CLLocation, radius: Int = 100) async throws -> [StationItem] {
// MARK: 위치 기반 주변 정류소 조회 -> 10m로 업데이트
func getNearbyStations(location: CLLocation, radius: Int = 10) async throws -> [StationItem] {
let baseURL = "http://ws.bus.go.kr/api/rest/stationinfo/getStationByPos"

Logger.log(message: "🚏 [API] Searching stations near (\(location.coordinate.latitude), \(location.coordinate.longitude))")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,48 +8,63 @@
import SwiftUI

struct HelpPageView: View {
@Binding var isPresented: Bool
@Environment(\.dismiss) private var dismiss
@State private var currentPage = 0

private var helpImages: [String] {
if UIApplication.isMinimumSizeDevice {
return ["RatioFixHelpImage1", "RatioFixHelpImage2"]
} else {
return ["HelpImage1", "HelpImage2"]
}
}

private var backButton: some View {
Button(action: {
dismiss()
}) {
Image(systemName: "chevron.left")
.foregroundColor(.white)
}
}

var body: some View {
ZStack {
Color.black.opacity(0.7)
.ignoresSafeArea()
.onTapGesture {
isPresented = false
}

VStack(spacing: 0) {
Image("HelpImage")
TabView(selection: $currentPage) {
ForEach(0..<helpImages.count, id: \.self) { index in
Image(helpImages[index])
.resizable()
.interpolation(.high)
.ignoresSafeArea()
.allowsHitTesting(false)
.scaledToFit()
.tag(index)
}

// 상단 헤더 영역
VStack {
HStack {
Button(action: {
isPresented = false
}) {
Image(systemName: "chevron.left")
.font(.title)
.foregroundColor(.white)
}
Spacer()
}
.padding(.horizontal, 20)
.padding(.top, 40)

Spacer()
}
.tabViewStyle(.page(indexDisplayMode: .never))
.frame(maxWidth: .infinity, maxHeight: .infinity)
.background(
ZStack {
Color("BFPrimaryColor")
Color.black.opacity(0.6)
}
.ignoresSafeArea()
)
.navigationBarTitleDisplayMode(.inline)
.navigationBarBackButtonHidden(true)
.navigationBarItems(leading: backButton)
.toolbar {
ToolbarItem(placement: .principal) {
Text("도움말")
.moveFont(.homeMediumTitle)
.foregroundColor(.white)
}
}
.toolbarBackground(Color("BFPrimaryColor"), for: .navigationBar)
.toolbarBackground(.visible, for: .navigationBar)
.toolbarColorScheme(.dark, for: .navigationBar)
}
}

#Preview {
ZStack {
Color.blue.ignoresSafeArea()
HelpPageView(isPresented: .constant(true))
NavigationStack {
HelpPageView()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,13 @@ struct InfoView: View {
.navigationBarTitleDisplayMode(.inline)
.navigationBarBackButtonHidden(true)
.navigationBarItems(leading: backButton)
.navigationTitle("앱정보")
.toolbar {
ToolbarItem(placement: .principal) {
Text("앱 정보")
.moveFont(.homeMediumTitle)
.foregroundColor(.white)
}
}
.toolbarBackground(Color("BFPrimaryColor"), for: .navigationBar)
.toolbarBackground(.visible, for: .navigationBar)
.toolbarColorScheme(.dark, for: .navigationBar)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,21 @@ struct HomeView: View {
@State private var isLoadingStation = false


// 화면 표시 상태
@State private var showHelpPage = false

// 버튼 상태
@State private var isButtonTapped = false


var body: some View {
NavigationStack {
VStack(spacing: 0) {
// 상단 헤더
GeometryReader { geometry in
NavigationStack {
VStack(spacing: 0) {
// 상태바 영역
Rectangle()
.fill(Color("BFPrimaryColor"))
.frame(height: 44)
// 상단 헤더
VStack(spacing: 0) {
// 상태바 영역
Rectangle()
.fill(Color("BFPrimaryColor"))
.frame(height: geometry.safeAreaInsets.top)

// 네비게이션 헤더
HStack {
Expand All @@ -47,14 +46,12 @@ struct HomeView: View {
Spacer()

HStack(spacing: 10) {
Button(action: {
showHelpPage = true
}) {
NavigationLink(destination: HelpPageView()) {
Image(systemName: "questionmark.circle")
.font(.title2)
.foregroundColor(.white)
}

NavigationLink(destination: InfoView()) {
Image(systemName: "gearshape")
.font(.title2)
Expand Down Expand Up @@ -212,28 +209,26 @@ struct HomeView: View {
setupAlertCallbacks()
locationManager.requestPermission()
}
.onChange(of: locationManager.currentLocation) { newLocation in
.onChange(of: locationManager.currentLocation) { _, newLocation in
if let location = newLocation {
findNearestStation(location: location)
}
}
.onChange(of: locationManager.showPermissionAlert) { shouldShow in
.onChange(of: locationManager.showPermissionAlert) { _, shouldShow in
if shouldShow {
alertManager.showAlert(.locationUnauthorized)
}
}
.onChange(of: nearestStation) { newStation in
.onChange(of: nearestStation) { _, newStation in
if newStation != nil {
refreshBusArrivals()
}
}
.alert(item: $alertManager.currentAlert) { alertType in
createAlert(for: alertType)
}
.overlay(
showHelpPage ? HelpPageView(isPresented: $showHelpPage) : nil
)
.navigationBarHidden(true)
}
}
}

Expand Down Expand Up @@ -342,7 +337,7 @@ struct HomeView: View {
Logger.log(message: "❌ [HomeView] Failed to find nearest station: \(error)")

// 서울 외 지역 체크
if error.domain == "OutOfSeoul" {
if error.domain == "noBusInfo" {
alertManager.showAlert(.noBusInfo)
} else {
alertManager.showAlert(.apiError)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ struct OnBoardingView: View {
Text(createAttributedString(from: title, highlight: "간편하게", color: Color("SecondaryPalette3")))
.moveFont(.homeTitle)
case 3:
Text(createAttributedString(from: title, highlight: "임산부", color: Color("CircularBus")))
Text(createAttributedString(from: title, highlight: "임산부", color: Color("Onboarding4")))
.moveFont(.homeTitle)
case 4:
Text(createAttributedString(from: title, highlight: "맘편한 이동", color: Color("MainPalette1")))
Expand Down
Loading