Skip to content

Commit

Permalink
[Feat] LocalMapVC UI 구현 (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
cirtuare committed Jan 14, 2025
1 parent f3047d3 commit 029851c
Show file tree
Hide file tree
Showing 5 changed files with 154 additions and 5 deletions.
8 changes: 8 additions & 0 deletions ACON-iOS/ACON-iOS.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@
74B25C322D2FF022008BDCB7 /* Shared.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 74B25C312D2FF022008BDCB7 /* Shared.xcconfig */; };
74CCB0802D36AAA000B254B7 /* LocalVerificationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74CCB07F2D36AA8400B254B7 /* LocalVerificationView.swift */; };
74CCB0822D36B3B200B254B7 /* LocalVerificationViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74CCB0812D36B3AA00B254B7 /* LocalVerificationViewController.swift */; };
74CCB0842D36C43C00B254B7 /* LocalMapView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74CCB0832D36C43400B254B7 /* LocalMapView.swift */; };
74CCB0862D36D4AA00B254B7 /* LocalMapViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74CCB0852D36D4A400B254B7 /* LocalMapViewController.swift */; };
74CDCE542D310A1C00E3A21A /* ACFontStyleType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74CDCE532D310A1100E3A21A /* ACFontStyleType.swift */; };
74CDCE562D310B1600E3A21A /* String+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74CDCE552D310B1300E3A21A /* String+.swift */; };
/* End PBXBuildFile section */
Expand Down Expand Up @@ -132,6 +134,8 @@
74B25C312D2FF022008BDCB7 /* Shared.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Shared.xcconfig; sourceTree = "<group>"; };
74CCB07F2D36AA8400B254B7 /* LocalVerificationView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocalVerificationView.swift; sourceTree = "<group>"; };
74CCB0812D36B3AA00B254B7 /* LocalVerificationViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocalVerificationViewController.swift; sourceTree = "<group>"; };
74CCB0832D36C43400B254B7 /* LocalMapView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocalMapView.swift; sourceTree = "<group>"; };
74CCB0852D36D4A400B254B7 /* LocalMapViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocalMapViewController.swift; sourceTree = "<group>"; };
74CDCE532D310A1100E3A21A /* ACFontStyleType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ACFontStyleType.swift; sourceTree = "<group>"; };
74CDCE552D310B1300E3A21A /* String+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "String+.swift"; sourceTree = "<group>"; };
B28431BAB67B99CD7B85C705 /* Pods_ACON_iOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ACON_iOS.framework; sourceTree = BUILT_PRODUCTS_DIR; };
Expand Down Expand Up @@ -483,6 +487,8 @@
74CCB07E2D36AA8000B254B7 /* View */ = {
isa = PBXGroup;
children = (
74CCB0852D36D4A400B254B7 /* LocalMapViewController.swift */,
74CCB0832D36C43400B254B7 /* LocalMapView.swift */,
74CCB0812D36B3AA00B254B7 /* LocalVerificationViewController.swift */,
74CCB07F2D36AA8400B254B7 /* LocalVerificationView.swift */,
);
Expand Down Expand Up @@ -642,9 +648,11 @@
748D6FA82D2C3F93007690B4 /* BaseViewController.swift in Sources */,
748D6F6A2D2BCA1C007690B4 /* SceneDelegate.swift in Sources */,
748ECA712D31A72A00BBC981 /* LoginViewModel.swift in Sources */,
74CCB0862D36D4AA00B254B7 /* LocalMapViewController.swift in Sources */,
748D6F872D2BD247007690B4 /* UIView+.swift in Sources */,
74CDCE562D310B1600E3A21A /* String+.swift in Sources */,
748D6F8B2D2BD31B007690B4 /* UIStackView+.swift in Sources */,
74CCB0842D36C43C00B254B7 /* LocalMapView.swift in Sources */,
748D6F912D2BD450007690B4 /* UILabel+.swift in Sources */,
748D6FAA2D2C3FF1007690B4 /* BaseCollectionViewCell.swift in Sources */,
748ECA6B2D31918D00BBC981 /* LoginView.swift in Sources */,
Expand Down
5 changes: 4 additions & 1 deletion ACON-iOS/ACON-iOS/Global/Literals/StringLiterals.swift
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ enum StringLiterals {

enum LocalVerification {

static let needLocalVerification = "로컬 맛집 추천을 위해\n지역 인증이 필요해요"
static let needLocalVerification = "로컬 맛집 추천을 위해\n지역 인증이 필요해요."

static let doLocalVerification = "자주 가는 동네로 지역 인증을 해보세요"

Expand All @@ -107,6 +107,9 @@ enum StringLiterals {

static let next = "다음"

static let finishVerification = "인증완료"

static let letsStart = "시작하기"
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
//
// LocalMapView.swift
// ACON-iOS
//
// Created by 이수민 on 1/15/25.
//

import UIKit

import SnapKit
import Then

final class LocalMapView: BaseView {

// MARK: - UI Properties

let localMapImageView: UIImageView = UIImageView()

var finishVerificationButton: UIButton = UIButton()

// MARK: - Lifecycle

override func setHierarchy() {
super.setHierarchy()

self.addSubviews(localMapImageView,
finishVerificationButton)
}

override func setLayout() {
super.setLayout()

localMapImageView.snp.makeConstraints {
$0.top.horizontalEdges.equalToSuperview()
$0.height.equalTo(ScreenUtils.height*564/780)
}

finishVerificationButton.snp.makeConstraints {
$0.bottom.equalToSuperview().inset(ScreenUtils.height*36/780)
$0.horizontalEdges.equalToSuperview().inset(ScreenUtils.width*20/360)
$0.height.equalTo(52)
}

}

override func setStyle() {
super.setStyle()

localMapImageView.do {
$0.backgroundColor = .gray
}

finishVerificationButton.do {
$0.setAttributedTitle(text: StringLiterals.LocalVerification.finishVerification,
style: .h8,
color: .acWhite,
for: .normal)
$0.backgroundColor = .gray5
$0.roundedButton(cornerRadius: 6, maskedCorners: [.layerMaxXMaxYCorner, .layerMaxXMinYCorner, .layerMinXMaxYCorner, .layerMinXMinYCorner])
}
}

}

Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
//
// LocalMapViewController.swift
// ACON-iOS
//
// Created by 이수민 on 1/15/25.
//

import UIKit

import SnapKit
import Then

class LocalMapViewController: BaseNavViewController {

// MARK: - UI Properties

private let localMapView = LocalMapView()

// MARK: - LifeCycle

override func viewDidLoad() {
super.viewDidLoad()

self.setXButton()
addTarget()
}

override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(false)

self.tabBarController?.tabBar.isHidden = true
}

override func setHierarchy() {
super.setHierarchy()

self.contentView.addSubview(localMapView)
}

override func setLayout() {
super.setLayout()

localMapView.snp.makeConstraints {
$0.edges.equalToSuperview()
}
}

override func setStyle() {
super.setStyle()

self.setXButton()
self.setSecondTitleLabelStyle(title: "지도에서 위치 확인하기")
}

func addTarget() {
localMapView.finishVerificationButton.addTarget(self,
action: #selector(finishVerificationButtonTapped),
for: .touchUpInside)
}

}


// MARK: - @objc functions

private extension LocalMapViewController {

@objc
func finishVerificationButtonTapped() {
// TODO: - 인증완료모달
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,15 @@ private extension LocalVerificationViewController {
@objc
func verifyLocationButtonTapped() {
localVerificationView.verifyNewLocalButton.isSelected.toggle()
localVerificationView.nextButton.isEnabled = localVerificationView.verifyNewLocalButton.isSelected
localVerificationView.nextButton.backgroundColor = localVerificationView.verifyNewLocalButton.isSelected ? .gray5 : .gray8
let isSelected = localVerificationView.verifyNewLocalButton.isSelected
localVerificationView.verifyNewLocalButton.configuration?.baseBackgroundColor = isSelected ? .gray7 : .gray9
localVerificationView.nextButton.isEnabled = isSelected
localVerificationView.nextButton.backgroundColor = isSelected ? .gray5 : .gray8
}

@objc
func nextButtonTapped() {
// TODO: - push to map
let vc = ViewController()
let vc = LocalMapViewController()
navigationController?.pushViewController(vc, animated: false)
}

Expand Down

0 comments on commit 029851c

Please sign in to comment.