-
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/Style] 마이페이지 피드, 캘린더 뷰를 구현했습니다.
- Loading branch information
Showing
31 changed files
with
1,164 additions
and
405 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
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,22 @@ | ||
// | ||
// CGFloat+.swift | ||
// Score | ||
// | ||
// Created by sole on 4/27/24. | ||
// | ||
|
||
import UIKit | ||
|
||
//MARK: - CGFloat | ||
|
||
extension CGFloat { | ||
//MARK: - device size | ||
static let deviceWidth = UIScreen.main.bounds.width | ||
static let deviceHeight = UIScreen.main.bounds.height | ||
|
||
//MARK: - calendarItemSize | ||
static var calendarItemSize: CGFloat { | ||
let paddingHorizontal: CGFloat = Constants.Layout.horizontal.rawValue * 2 | ||
return (.deviceWidth - paddingHorizontal) / 7 | ||
} | ||
} |
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,59 @@ | ||
// | ||
// Image+.swift | ||
// Score | ||
// | ||
// Created by sole on 4/27/24. | ||
// | ||
|
||
import SwiftUI | ||
|
||
//MARK: - Image+imagePlaceHolder | ||
|
||
extension Image { | ||
|
||
//MARK: - imagePlaceHolder | ||
|
||
/// image 플레이스 홀더가 필요한 사진의 경우에 사용합니다. | ||
/// 플레이스 홀더를 원형의 size*size로 생성합니다. | ||
@ViewBuilder | ||
func imagePlaceHolder(size: CGFloat) -> some View { | ||
self | ||
.resizable() | ||
.frame(width: 130, | ||
height: 130) | ||
.clipShape(Circle()) | ||
.background { | ||
Circle() | ||
.frame(width: size, | ||
height: size) | ||
.foregroundStyle( | ||
Color.brandColor(color: .gray2) | ||
) | ||
} | ||
.frame(width: size, | ||
height: size) | ||
} | ||
} | ||
|
||
extension Image? { | ||
|
||
@ViewBuilder | ||
func imagePlaceHolder(size: CGFloat) -> some View { | ||
let image: Image = self ?? Image("") | ||
image | ||
.resizable() | ||
.frame(width: 130, | ||
height: 130) | ||
.clipShape(Circle()) | ||
.background { | ||
Circle() | ||
.frame(width: size, | ||
height: size) | ||
.foregroundStyle( | ||
Color.brandColor(color: .gray2) | ||
) | ||
} | ||
.frame(width: size, | ||
height: size) | ||
} | ||
} |
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
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,36 @@ | ||
// | ||
// SCLineTabBarFeature.swift | ||
// Score | ||
// | ||
// Created by sole on 4/24/24. | ||
// | ||
|
||
import ComposableArchitecture | ||
|
||
@Reducer | ||
struct SCLineTabBarFeature<T: SCLineTabProtocol> { | ||
struct State: Equatable { | ||
var tabItems: [SCLineTabItem<T>] = [] | ||
@BindingState var selectedTab: T | ||
} | ||
|
||
enum Action: BindableAction { | ||
case binding(BindingAction<State>) | ||
case tabBarButtonTapped(SCLineTabItem<T>) | ||
} | ||
|
||
var body: some ReducerOf<Self> { | ||
BindingReducer() | ||
|
||
Reduce { state, action in | ||
switch action { | ||
case .binding: | ||
return .none | ||
|
||
case .tabBarButtonTapped(let tabItem): | ||
state.selectedTab = tabItem.tab | ||
return .none | ||
} | ||
} | ||
} | ||
} |
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
Oops, something went wrong.