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
4 changes: 2 additions & 2 deletions ACON-iOS/ACON-iOS.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2436,7 +2436,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 2025.0804.0047;
CURRENT_PROJECT_VERSION = 2025.0807.0103;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = KX5Q77JSUF;
Expand Down Expand Up @@ -2479,7 +2479,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 2025.0804.0047;
CURRENT_PROJECT_VERSION = 2025.0807.0103;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = KX5Q77JSUF;
GENERATE_INFOPLIST_FILE = NO;
Expand Down
39 changes: 39 additions & 0 deletions ACON-iOS/ACON-iOS/Global/Extensions/UIView+.swift
Original file line number Diff line number Diff line change
Expand Up @@ -173,3 +173,42 @@ extension UIView {
}

}

// MARK: - Animation

extension UIView {

/// 아래에서 위로 올라오며 페이드 인하는 애니메이션
/// - Parameters:
/// - duration: 애니메이션 전체 시간
/// - delay: 지연 시간 (뷰마다 순차적으로 나타나게 하고 싶을 때 활용)
/// - damping: 스프링 애니메이션 감쇠 비율 (0: 스프링 <-> 1: 스르륵)
/// - initialSpringVelocity: 초기 속도
/// - yOffset: 시작 위치의 y축 오프셋 (양수로 설정하면 아래서 시작)
func animateSlideUp(
duration: TimeInterval = 0.8,
delay: TimeInterval = 0,
damping: CGFloat = 1.0,
initialSpringVelocity: CGFloat = 0.0,
yOffset: CGFloat = 30
) {
self.transform = CGAffineTransform(translationX: 0, y: yOffset)
self.alpha = 0
self.isHidden = false

UIView.animate(
withDuration: duration,
delay: delay,
usingSpringWithDamping: damping,
initialSpringVelocity: initialSpringVelocity,
options: [.curveEaseOut],
animations: {
self.transform = .identity
self.alpha = 1
},
completion: nil
)
}

}

2 changes: 1 addition & 1 deletion ACON-iOS/ACON-iOS/Global/Settings/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>2025.0804.0047</string>
<string>2025.0807.0103</string>
<key>GADApplicationIdentifier</key>
<string>${GAD_APPLICATION_IDENTIFIER}</string>
<key>GAD_AD_UNIT_ID</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ enum ACAlertType: CaseIterable {

case naverAPILimitExceeded // NOTE: 일일 네이버 API 호출 가능 횟수 (25000회) 초과
case quitSpotUpload // NOTE: 장소 등록 취소
case deletePhoto // NOTE: 사진 삭제 (장소 업로드)
case spotUploadFail // NOTE: 장소 업로드 실패

case libraryAccessDenied // NOTE: 사진 권한 X
case changeNotSaved // NOTE: 프로필 변경사항 저장 X
Expand All @@ -30,8 +32,6 @@ enum ACAlertType: CaseIterable {

case logout // NOTE: 로그아웃

case deletePhoto // NOTE: 사진 삭제 (장소 업로드)
case spotUploadFail // NOTE: 장소 업로드 실패

var title: String {
switch self {
Expand All @@ -47,7 +47,7 @@ enum ACAlertType: CaseIterable {
case .naverAPILimitExceeded:
return "장소 등록 마감"
case .quitSpotUpload:
return "등록을 취소하시겠습니까?"
return "여기서 그만두면\n작성 중인 내용이 사라져요"

case .libraryAccessDenied:
return "'Acon'에 대한 라이브러리\n읽기/쓰기 기능이 없습니다."
Expand Down Expand Up @@ -128,11 +128,11 @@ enum ACAlertType: CaseIterable {
return "설정으로 가기"
case .naverAPILimitExceeded:
return "제보하기"
case .changeNotSaved, .quitSpotUpload:
case .changeNotSaved:
return "나가기"
case .changeVerifiedArea:
return "변경하기"
case .quitOnboarding:
case .quitOnboarding, .quitSpotUpload:
return "그만두기"
case .logout:
return "로그아웃"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,3 +122,12 @@ extension SpotUploadType {
}

}


// MARK: - 추천 메뉴

extension SpotUploadType {

static let recommendedMenuMaxLength: Int = 30

}
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ final class BaseUploadInquiryView: BaseView {

private let scrollContentView = UIView()

private let requirementLabel = UILabel()
let requirementLabel = UILabel()

private let titleLabel = UILabel()
let titleLabel = UILabel()

let captionLabel = UILabel()

Expand Down Expand Up @@ -117,6 +117,8 @@ final class BaseUploadInquiryView: BaseView {
if let caption {
captionLabel.setLabel(text: caption, style: .t5R, color: .gray500)
}

[requirementLabel, titleLabel, captionLabel, contentView].forEach { $0.isHidden = true }
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ class BaseUploadInquiryViewController: BaseViewController {
let viewModel: SpotUploadViewModel
let spotUploadInquiryView: BaseUploadInquiryView

let hasCaption: Bool
var isInitialAppear: Bool = true

// NOTE: 하위 뷰컨에서 override하여 설정
var contentViews: [UIView] { [] }
var canGoPrevious: Bool { true }
Expand All @@ -24,6 +27,7 @@ class BaseUploadInquiryViewController: BaseViewController {

init(viewModel: SpotUploadViewModel, requirement: RequirementType, title: String, caption: String? = nil) {
self.viewModel = viewModel
self.hasCaption = caption != nil
self.spotUploadInquiryView = BaseUploadInquiryView(requirement: requirement, title: title, caption: caption)

super.init(nibName: nil, bundle: nil)
Expand All @@ -46,6 +50,15 @@ class BaseUploadInquiryViewController: BaseViewController {
updatePagingButtonStates()
}

override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)

if isInitialAppear {
playSlideUpAnimation()
isInitialAppear = false
}
}


// MARK: - Hierarchy

Expand Down Expand Up @@ -86,4 +99,13 @@ class BaseUploadInquiryViewController: BaseViewController {
}
}

func playSlideUpAnimation() {
let titleDelay: TimeInterval = 0.3
let contentDelay: TimeInterval = 0.6
spotUploadInquiryView.requirementLabel.animateSlideUp()
spotUploadInquiryView.titleLabel.animateSlideUp(delay: titleDelay)
if hasCaption { spotUploadInquiryView.captionLabel.animateSlideUp(delay: 2 * titleDelay) }
spotUploadInquiryView.contentView.animateSlideUp(delay: contentDelay + titleDelay * (hasCaption ? 2 : 1))
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,13 @@ private extension MenuRecommendationViewController {
textField.observableText.bind { [weak self] text in
guard let text else { return }
self?.textField.hideClearButton(isHidden: text.isEmpty)

// NOTE: 글자수 제한
guard text.count <= SpotUploadType.recommendedMenuMaxLength else {
self?.textField.text?.removeLast()
return
}

self?.viewModel.recommendedMenu = text
self?.updatePagingButtonStates()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ final class SpotUploadViewController: BaseNavViewController {
override func setStyle() {
super.setStyle()

setXButtonAction()
setXButton(#selector(showQuitAlert))

self.setCenterTitleLabelStyle(title: StringLiterals.SpotUpload.spotUpload)

Expand Down Expand Up @@ -128,18 +128,6 @@ final class SpotUploadViewController: BaseNavViewController {
for: .touchUpInside)
}

private func setXButtonAction() {
let currentVC = pages[currentIndex]

leftButton.removeTarget(nil, action: nil, for: .touchUpInside)

if currentVC is SpotUploadSearchViewController {
setXButton(#selector(showQuitAlert))
} else {
setXButton(#selector(navigateToTabBar))
}
}

}


Expand Down Expand Up @@ -190,7 +178,6 @@ private extension SpotUploadViewController {
@objc func goToPreviousPage() {
guard currentIndex > 0 else { return }
currentIndex -= 1
self.setXButtonAction()
pageVC.setViewControllers([pages[currentIndex]], direction: .reverse, animated: true, completion: nil)
}

Expand All @@ -202,7 +189,6 @@ private extension SpotUploadViewController {
}
if currentIndex < lastIndex { // NOTE: 다음페이지
currentIndex += 1
self.setXButtonAction()
pageVC.setViewControllers([pages[currentIndex]], direction: .forward, animated: true, completion: nil)
} else if currentIndex == lastIndex { // NOTE: 마지막페이지 -> post
viewModel.uploadSpot()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ class ReviewMenuRecommendationViewController: BaseNavViewController {
override func setStyle() {
super.setStyle()

self.setPopGesture()

// NOTE: 네비게이션 바
self.setCenterTitleLabelStyle(title: StringLiterals.Upload.upload)
self.setBackButton()
Expand All @@ -93,6 +95,13 @@ private extension ReviewMenuRecommendationViewController {
func bindObservable() {
textField.observableText.bind { [weak self] text in
guard let text else { return }

// NOTE: 글자수 제한
guard text.count <= SpotUploadType.recommendedMenuMaxLength else {
self?.textField.text?.removeLast()
return
}

self?.viewModel.recommendedMenu = text
self?.updateInputUIState()
}
Expand Down