Skip to content

Commit

Permalink
[Fix] #516 - Resolve conflict in merge process
Browse files Browse the repository at this point in the history
  • Loading branch information
HanGyeongjun committed Apr 7, 2024
2 parents 83fdfb9 + d2cc1c2 commit 94d9759
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 5 deletions.
6 changes: 6 additions & 0 deletions HappyAnding/HappyAnding.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@
A0DD085729276608008177BB /* URL+DeepLink.swift in Sources */ = {isa = PBXBuildFile; fileRef = A0DD085629276608008177BB /* URL+DeepLink.swift */; };
A0F822AC2910B8F100AF4448 /* ShortcutsZipViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A0F822AB2910B8F100AF4448 /* ShortcutsZipViewModel.swift */; };
A0F822B729164D2300AF4448 /* ListCategoryShortcutView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A0F822B629164D2300AF4448 /* ListCategoryShortcutView.swift */; };
A309862B2BBFE5650004D993 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4D5889E72AA36A52000C4849 /* AppDelegate.swift */; };
A309862D2BBFE5F50004D993 /* FirebaseMessaging in Frameworks */ = {isa = PBXBuildFile; productRef = A309862C2BBFE5F50004D993 /* FirebaseMessaging */; };
A309862F2BBFE6B90004D993 /* View+Shadow.swift in Sources */ = {isa = PBXBuildFile; fileRef = A309862E2BBFE6B90004D993 /* View+Shadow.swift */; };
A31F1844292A637300AF4A82 /* Date+String.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9CAEF822914855900224B0A /* Date+String.swift */; };
A31F1846292A638700AF4A82 /* (null) in Sources */ = {isa = PBXBuildFile; };
A31F1848292A64D700AF4A82 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 87E99C7128F94EA8009B691F /* Assets.xcassets */; };
Expand Down Expand Up @@ -281,6 +284,7 @@
A0DD085629276608008177BB /* URL+DeepLink.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "URL+DeepLink.swift"; sourceTree = "<group>"; };
A0F822AB2910B8F100AF4448 /* ShortcutsZipViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShortcutsZipViewModel.swift; sourceTree = "<group>"; };
A0F822B629164D2300AF4448 /* ListCategoryShortcutView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListCategoryShortcutView.swift; sourceTree = "<group>"; };
A309862E2BBFE6B90004D993 /* View+Shadow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "View+Shadow.swift"; sourceTree = "<group>"; };
A323D3C92AEE870700DDA716 /* SuggestionForm.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SuggestionForm.swift; sourceTree = "<group>"; };
A323D3CB2AEEA10F00DDA716 /* SuggestionFormViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SuggestionFormViewModel.swift; sourceTree = "<group>"; };
A33F74AD2908D8C800B8D0D0 /* CheckBoxShortcutCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CheckBoxShortcutCell.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -392,6 +396,7 @@
8786B2E329A7F966000B46A1 /* View+NavigationBar.swift */,
8751B29829A32CC000C2B27E /* View+Navigation.swift */,
8786B33D29ABA5A9000B46A1 /* View+Shape.swift */,
A309862E2BBFE6B90004D993 /* View+Shadow.swift */,
8786B2E129A7F93B000B46A1 /* View+UIFont.swift */,
);
path = View;
Expand Down Expand Up @@ -1026,6 +1031,7 @@
87E99CA128FFF225009B691F /* MyPageView.swift in Sources */,
8792478D2918CE450040D5C3 /* UINavigationContoller+Gesture.swift in Sources */,
8786B33C29ABA588000B46A1 /* View+Gesture.swift in Sources */,
A309862F2BBFE6B90004D993 /* View+Shadow.swift in Sources */,
87E99CC7290145AD009B691F /* ShortcutCell.swift in Sources */,
87E99CBB28FFF298009B691F /* IconModalView.swift in Sources */,
87E99C7028F94EA6009B691F /* ShortcutTabView.swift in Sources */,
Expand Down
20 changes: 20 additions & 0 deletions HappyAnding/HappyAnding/Extensions/View/View+Shadow.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//
// View+Shadow.swift
// HappyAnding
//
// Created by HanGyeongjun on 4/5/24.
//

import SwiftUI

extension View {

///View에 Drop Shadow를 적용합니다.
///모든 View에서 사용되는 값에 변화가 없어 매개변수는 없습니다.
func dropShadow() -> some View {
self.shadow(color: Color("CharcoalGray").opacity(0.04),
radius: 8,
x: 0,
y: 2)
}
}
18 changes: 13 additions & 5 deletions HappyAnding/HappyAnding/Extensions/View/View+Shape.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,23 @@ import SwiftUI
/// 뷰의 모서리를 설정하기 위한 확장입니다.
extension View {

//TODO: 디자인 업데이트 완료 후 해당 익스텐션 삭제 필요
func cornerRadius(_ radius: CGFloat, corners: UIRectCorner) -> some View {
clipShape( RoundedCorner(radius: radius, corners: corners) )
}

func roundedBorder(cornerRadius: CGFloat, color: Color = Color("CharcoalGray"), opacity: Double = 0.04, lineWidth: CGFloat = 2) -> some View {
///반투명 테두리가 있는 둥근 모서리를 설정하기 위한 확장입니다.
///테두리의 두께는 고정값입니다.
///
///cornerRadius: 둥근 모서리의 정도를 설정합니다. 기본값 16.
///color: 테두리의 색상을 설정합니다. 기본값 "CharcoalGray"
///isBlendMode: 블랜드모드 적용을 조정합니다. 기본값 false
///opacity: 테두리의 투명도를 설정합니다. 기본값 1.0
func roundedBorder(cornerRadius: CGFloat = 16, color: Color = Color("CharcoalGray"), isNormalBlend: Bool = true, opacity: Double = 1.0) -> some View {
self.overlay(
RoundedRectangle(cornerRadius: cornerRadius)
.stroke(color.opacity(opacity), lineWidth: lineWidth)
.blendMode(.multiply)
.strokeBorder(color.opacity(opacity), lineWidth: 2)
.blendMode(isNormalBlend ? .normal : .multiply)
)
.clipShape(RoundedRectangle(cornerRadius: cornerRadius))
}
Expand All @@ -29,10 +37,10 @@ extension View {

/// 해당 Shape을 이용하여 다른 뷰에 적용합니다.
struct RoundedCorner: Shape {

var radius: CGFloat = .infinity
var corners: UIRectCorner = .allCorners

func path(in rect: CGRect) -> Path {
let path = UIBezierPath(roundedRect: rect, byRoundingCorners: corners, cornerRadii: CGSize(width: radius, height: radius))
return Path(path.cgPath)
Expand Down

0 comments on commit 94d9759

Please sign in to comment.