-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[Feat] 홈 화면 - 구글 지도, 마이페이지 버튼
- Loading branch information
Showing
9 changed files
with
180 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
...cato-iOS/Staccato-iOS.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"originHash" : "fe5dd08882d08507f16493adf883e323b1dd5a821ac629f6777702bda6b2ba4e", | ||
"pins" : [ | ||
{ | ||
"identity" : "ios-maps-sdk", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/googlemaps/ios-maps-sdk", | ||
"state" : { | ||
"revision" : "df7ecd2f894fd83f0287f2cfb6842a0dfe6f290b", | ||
"version" : "9.2.0" | ||
} | ||
} | ||
], | ||
"version" : 3 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// | ||
// AppDelegate.swift | ||
// Staccato-iOS | ||
// | ||
// Created by 김유림 on 1/10/25. | ||
// | ||
|
||
import GoogleMaps | ||
|
||
import UIKit | ||
|
||
// Maps SDK 초기화를 위해 AppDelegate 구현 | ||
class AppDelegate: NSObject, UIApplicationDelegate { | ||
func application( | ||
_ application: UIApplication, | ||
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? | ||
) -> Bool { | ||
let apiKey = Bundle.main.infoDictionary?["API_KEY"] as! String | ||
GMSServices.provideAPIKey(apiKey) | ||
|
||
return true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
Staccato-iOS/Staccato-iOS/Presentation/View/Home/HomeView.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
// | ||
// HomeView.swift | ||
// Staccato-iOS | ||
// | ||
// Created by 김유림 on 1/9/25. | ||
// | ||
|
||
import GoogleMaps | ||
|
||
import SwiftUI | ||
|
||
struct HomeView: View { | ||
|
||
// MARK: - Body | ||
var body: some View { | ||
NavigationView { | ||
ZStack(alignment: .topLeading) { | ||
MapViewControllerBridge() | ||
.edgesIgnoringSafeArea(.all) | ||
|
||
myPageNavigationLink | ||
.padding(20) | ||
} | ||
} | ||
} | ||
} | ||
|
||
|
||
// MARK: - Components | ||
extension HomeView { | ||
private var myPageNavigationLink: some View { | ||
NavigationLink(destination: TempMyPageView()) { | ||
Image(systemName: "person.circle.fill") | ||
.resizable() | ||
.aspectRatio(contentMode: .fit) | ||
.frame(width: 40, height: 40) | ||
.background(Color.white) | ||
.foregroundStyle(.gray3) | ||
.clipShape(Circle()) | ||
.overlay { | ||
Circle().stroke(Color.white, lineWidth: 2) | ||
} | ||
} | ||
} | ||
} | ||
|
||
#Preview { | ||
HomeView() | ||
} | ||
|
||
|
||
|
||
// 임시 뷰 - 추후 삭제 예정 | ||
struct TempMyPageView: View { | ||
var body: some View { | ||
Text("My Page") | ||
.font(.largeTitle) | ||
.fontWeight(.bold) | ||
.padding() | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
Staccato-iOS/Staccato-iOS/Presentation/View/Home/MapViewController.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// | ||
// MapViewController.swift | ||
// Staccato-iOS | ||
// | ||
// Created by 김유림 on 1/9/25. | ||
// | ||
|
||
import GoogleMaps | ||
|
||
import UIKit | ||
|
||
class MapViewController: UIViewController { | ||
|
||
let map = GMSMapView(frame: .zero) | ||
var isAnimating: Bool = false | ||
|
||
override func loadView() { | ||
super.loadView() | ||
self.view = map | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
Staccato-iOS/Staccato-iOS/Presentation/View/Home/MapViewControllerBridge.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// | ||
// MapViewControllerBridge.swift | ||
// Staccato-iOS | ||
// | ||
// Created by 김유림 on 1/9/25. | ||
// | ||
|
||
import GoogleMaps | ||
|
||
import SwiftUI | ||
|
||
struct MapViewControllerBridge: UIViewControllerRepresentable { | ||
|
||
func makeUIViewController(context: Context) -> MapViewController { | ||
return MapViewController() | ||
} | ||
|
||
func updateUIViewController(_ uiViewController: MapViewController, context: Context) { | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters