Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: 마이페이지 UI 구현 #34

Merged
merged 26 commits into from
Jul 8, 2024

Conversation

hryeong66
Copy link
Collaborator

@hryeong66 hryeong66 commented Jun 29, 2024

What is this PR? 🔍

이슈

설명

Changes 📝

  • 마이페이지 UI만 우선 구현했습니다.
    마이페이지 중에 level 달성 조건 뷰는 아직 미완성입니다
    요것도 됐습니답!
image
  • @lina0322넴~ 검색결과화면 DesignSystem > View > Meme > MemeListView 사용하면 될 것 같아요~!

Screenshot 📸

image

Simulator Screenshot - iPhone 15 Pro - 2024-06-30 at 06 14 28

To Reviewers 🙏

@hryeong66 hryeong66 added the 🧘🏽‍♂️ Feature 기능 개발 label Jun 29, 2024
@hryeong66 hryeong66 self-assigned this Jun 29, 2024
hryeong66 added 6 commits July 3, 2024 23:58
…ash-up-kr/PPAC-iOS into feature/myPage-MymemeList-hyerjang-#25

# Conflicts:
#	Projects/Core/DesignSystem/Sources/View/ListHeaderView.swift
#	Projects/Features/MyPage/Sources/View/MyPageSettingHeaderView.swift
#	Projects/Features/MyPage/Sources/View/MyPageView.swift
Copy link

@AhnSangHee AhnSangHee left a comment

Choose a reason for hiding this comment

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

LGTM


import SwiftUI

public struct RoundedCorners: Shape {
Copy link
Collaborator

Choose a reason for hiding this comment

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

RoundedRectangle과 뭐가 다른거죵?

Copy link
Member

Choose a reason for hiding this comment

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

특정 모서리만 둥글게 할 수 있다는 것?🌀.🌀

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

맞습니당 특정 모서리만 둥글게 하려고 추가했어요!
image

 .background {
      RoundedCorners(radius: 20, corners: [.topLeft, .topRight])
        .stroke(Color.Border.tertiary, lineWidth: 1, fill: Color.Background.assistive)
    }

Copy link
Member

@chansooo chansooo left a comment

Choose a reason for hiding this comment

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

수고하셨습니다~
로직들 ViewModel 구현해서 붙여주면 끝나겠네요~

Comment on lines 10 to 13
public extension UIScreen {
static let screenWidth = UIScreen.main.bounds.width
static let screenHeight = UIScreen.main.bounds.width
}
Copy link
Member

Choose a reason for hiding this comment

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

import SwiftUI

struct ScreenSizeKey: EnvironmentKey {
    static let defaultValue: CGSize = UIScreen.main.bounds.size
}

extension EnvironmentValues {
    var screenSize: CGSize {
        get { self[ScreenSizeKey.self] }
        set { self[ScreenSizeKey.self] = newValue }
    }
}

요렇게 environment로 사용하는 건 어떨까요??

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

오 좋습니다~! 반영했습니답~f3cfcab

Comment on lines +58 to +61
.onSuccess { result in
let ratio = geometry.size.width / result.image.size.width
imageHeight = result.image.size.height * ratio
}
Copy link
Member

Choose a reason for hiding this comment

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

.aspectRatio(비율, contentMode: <#T##ContentMode#>)
쓰면 더 깔끔할 것 같은데 다른 이유가 있을까요???

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ratio로도 해봤는데 GeometryReader써서 할때 하위뷰(현재 KFImage) 크기를 정확하게 알지 못해서 그런건지.. (정확하지 않아서 좀 더 찾아봐야 해여,,😅)
ratio로만 하면 그려지지 않는 문제가 있어서.. 우선 height로 했습니다!
image

Comment on lines +36 to +46
public var levelStepText: String {
switch self {
case .level1:
return "밈 보기"
case .level2:
return "ㅋ 남기기"
case .level3:
return "밈 공유"
case .level4:
return "밈 저장"
}
Copy link
Member

Choose a reason for hiding this comment

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

요거는 순서가 static하게 정해져있는 걸까요???

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

넵 요거 level별로 text가 정해져있습니답!
image

Comment on lines 20 to 23
private var currentLevelWidth: CGFloat {
let width = (UIScreen.screenWidth - horizontalPadding * 2) / 20.0 * CGFloat(conditionCount)
return width < minimumWidth ? minimumWidth : width
}
Copy link
Member

Choose a reason for hiding this comment

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

위에 언급한 environmentkey 적용하고,
@Environment(\.ScreenWidth) var screenWidth 사용하는 건 어떨까요?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

제안 감사합니다~!
요 부분은 제가 개발한 뷰에서 전체 screenSize 에서 geometryReader 활용하는 걸로 변경했습니답!
801edc1

@hryeong66 hryeong66 force-pushed the feature/myPage-MymemeList-hyerjang-#25 branch from 117d38e to d9ea49b Compare July 7, 2024 05:36
@hryeong66 hryeong66 merged commit f428e4f into develop Jul 8, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] 마이페이지 - 나의 파밈함 리스트 및 밈 아이템 컴포넌트 구현
5 participants