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: 0 additions & 4 deletions ACON-iOS/ACON-iOS.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
1558BADE2D31AB6C00ECDEF8 /* SpotListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1558BADD2D31AB6C00ECDEF8 /* SpotListViewController.swift */; };
155BC2922DF09EB200E1744E /* ShadowColorCache.swift in Sources */ = {isa = PBXBuildFile; fileRef = 155BC2912DF09EB200E1744E /* ShadowColorCache.swift */; };
155D456B2E26A538008C0316 /* SpotUploadViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 155D456A2E26A538008C0316 /* SpotUploadViewController.swift */; };
155D45AD2E26A575008C0316 /* SpotUploadView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 155D45AC2E26A575008C0316 /* SpotUploadView.swift */; };
155D45AF2E26B04F008C0316 /* SpotTypeSelectionViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 155D45AE2E26B04F008C0316 /* SpotTypeSelectionViewController.swift */; };
155D45B12E26B2E3008C0316 /* SpotUploadSearchViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 155D45B02E26B2E3008C0316 /* SpotUploadSearchViewController.swift */; };
155D45B32E26B8CB008C0316 /* BaseUploadInquiryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 155D45B22E26B8CB008C0316 /* BaseUploadInquiryView.swift */; };
Expand Down Expand Up @@ -345,7 +344,6 @@
1558BADD2D31AB6C00ECDEF8 /* SpotListViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpotListViewController.swift; sourceTree = "<group>"; };
155BC2912DF09EB200E1744E /* ShadowColorCache.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShadowColorCache.swift; sourceTree = "<group>"; };
155D456A2E26A538008C0316 /* SpotUploadViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpotUploadViewController.swift; sourceTree = "<group>"; };
155D45AC2E26A575008C0316 /* SpotUploadView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpotUploadView.swift; sourceTree = "<group>"; };
155D45AE2E26B04F008C0316 /* SpotTypeSelectionViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpotTypeSelectionViewController.swift; sourceTree = "<group>"; };
155D45B02E26B2E3008C0316 /* SpotUploadSearchViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpotUploadSearchViewController.swift; sourceTree = "<group>"; };
155D45B22E26B8CB008C0316 /* BaseUploadInquiryView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseUploadInquiryView.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -848,7 +846,6 @@
1579F2F62E296071006B4DEE /* SpotUpload */ = {
isa = PBXGroup;
children = (
155D45AC2E26A575008C0316 /* SpotUploadView.swift */,
155D456A2E26A538008C0316 /* SpotUploadViewController.swift */,
);
path = SpotUpload;
Expand Down Expand Up @@ -2249,7 +2246,6 @@
156AA7242D6504F1005B8DCE /* GetVerifiedAreaListResponse.swift in Sources */,
74770C1B2DF35848005D4165 /* ProfileGoogleAdView.swift in Sources */,
74E38D342D69B46F009449D4 /* LocationUtils.swift in Sources */,
155D45AD2E26A575008C0316 /* SpotUploadView.swift in Sources */,
74EC5A2A2DF4C72200E176A8 /* GetSavedSpotsResponse.swift in Sources */,
1558BADB2D31AAF900ECDEF8 /* ACTabBarItemType.swift in Sources */,
15ABCBFC2DF775E8000269F7 /* SpotImageStatusType.swift in Sources */,
Expand Down
19 changes: 15 additions & 4 deletions ACON-iOS/ACON-iOS/Global/UIComponents/ACButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,8 @@ extension ACButton {

/// Set Glassmorphism Border
private func applyGlassBorder(_ attributes: GlassBorderAttributes) {
guard bounds.width > 0 && bounds.height > 0 else { return }

borderGlassmorphismView?.removeFromSuperview()
borderLayer?.removeFromSuperlayer()
self.layer.borderWidth = 0
Expand All @@ -198,9 +200,9 @@ extension ACButton {
let innerPath = UIBezierPath(roundedRect: innerRect, cornerRadius: max(0, attributes.cornerRadius - attributes.width/2))
outerPath.append(innerPath.reversing())

glassmorphismView = GlassmorphismView(attributes.glassmorphismType)
borderGlassmorphismView = GlassmorphismView(attributes.glassmorphismType)

if let glassmorphismView = glassmorphismView {
if let glassmorphismView = borderGlassmorphismView {
Comment on lines -201 to +205
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

와 이게 이렇게 돼있었구나..... 디버깅천재 이수민 ㅠㅠㅠ 감사합니다

self.insertSubview(glassmorphismView, at: 0)
glassmorphismView.isUserInteractionEnabled = false

Expand All @@ -224,7 +226,14 @@ extension ACButton {
glassmorphismView?.layer.cornerRadius = self.layer.cornerRadius
glassmorphismView?.layer.masksToBounds = true

if let attributes = glassBorderAttributes, bounds.width > 0, bounds.height > 0 {
if let attributes = glassBorderAttributes,
bounds.width > 0, bounds.height > 0 {
if let existingView = borderGlassmorphismView {
if existingView.frame.size == bounds.size &&
existingView.frame.width > 0 && existingView.frame.height > 0 {
return
}
}
applyGlassBorder(attributes)
}
}
Expand Down Expand Up @@ -305,7 +314,9 @@ extension ACButton {

// NOTE: 정상적인 버튼 글라스모피즘 적용을 위해 Cell prepareForReuse에서 호출
func refreshButtonBlurEffect(_ glassType: GlassmorphismType) {
setGlassmorphism(glassType)
if buttonStyleType.glassmorphismType != nil {
setGlassmorphism(glassType)
}

if let attributes = glassBorderAttributes {
let updatedAttributes = GlassBorderAttributes(
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ final class SpotUploadViewController: BaseNavViewController {

private var pageVC = UIPageViewController(transitionStyle: .scroll, navigationOrientation: .vertical)

private let spotUploadView = SpotUploadView()
let previousButton = ACButton(style: GlassButton(borderGlassmorphismType: .buttonGlassDefault, buttonType: .line_22_b1SB),
title: StringLiterals.SpotUpload.goPrevious)

let nextButton = ACButton(style: GlassButton(glassmorphismType: .buttonGlassDefault, buttonType: .full_22_b1SB),
title: StringLiterals.SpotUpload.next)


// MARK: - LifeCycle
Expand All @@ -45,25 +49,34 @@ final class SpotUploadViewController: BaseNavViewController {

override func setHierarchy() {
super.setHierarchy()

self.contentView.addSubview(spotUploadView)

self.addChild(pageVC)

spotUploadView.addSubview(pageVC.view)
self.contentView.addSubviews(previousButton, nextButton, pageVC.view)

pageVC.didMove(toParent: self)
}

override func setLayout() {
super.setLayout()

spotUploadView.snp.makeConstraints {
$0.edges.equalToSuperview()

previousButton.snp.makeConstraints {
$0.leading.equalToSuperview().offset(ScreenUtils.horizontalInset)
$0.bottom.equalTo(view.safeAreaLayoutGuide)
$0.height.equalTo(44)
$0.width.equalTo(120 * ScreenUtils.widthRatio)
}

nextButton.snp.makeConstraints {
$0.trailing.equalToSuperview().offset(-ScreenUtils.horizontalInset)
$0.bottom.equalTo(view.safeAreaLayoutGuide)
$0.height.equalTo(44)
$0.width.equalTo(200 * ScreenUtils.widthRatio)
}

pageVC.view.snp.makeConstraints {
$0.top.horizontalEdges.equalToSuperview()
$0.bottom.equalTo(spotUploadView.nextButton.snp.top).offset(-10)
$0.bottom.equalTo(nextButton.snp.top).offset(-10)
}
}

Expand All @@ -85,13 +98,13 @@ final class SpotUploadViewController: BaseNavViewController {
}

private func addTarget() {
spotUploadView.previousButton.addTarget(self,
action: #selector(goToPreviousPage),
for: .touchUpInside)
previousButton.addTarget(self,
action: #selector(goToPreviousPage),
for: .touchUpInside)

spotUploadView.nextButton.addTarget(self,
action: #selector(goToNextPage),
for: .touchUpInside)
nextButton.addTarget(self,
action: #selector(goToNextPage),
for: .touchUpInside)
}

}
Expand All @@ -104,13 +117,13 @@ private extension SpotUploadViewController {
func bindViewModel() {
viewModel.isPreviousButtonEnabled.bind { [weak self] isEnabled in
guard let isEnabled else { return }
self?.spotUploadView.previousButton.updateGlassButtonState(state: isEnabled ? .default : .disabled)
self?.previousButton.updateGlassButtonState(state: isEnabled ? .default : .disabled)
self?.viewModel.isPreviousButtonEnabled.value = nil
}

viewModel.isNextButtonEnabled.bind { [weak self] isEnabled in
guard let isEnabled else { return }
self?.spotUploadView.nextButton.updateGlassButtonState(state: isEnabled ? .default : .disabled)
self?.nextButton.updateGlassButtonState(state: isEnabled ? .default : .disabled)
self?.viewModel.isNextButtonEnabled.value = nil
}
}
Expand Down