-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
feat: MemeItemView 추가
# Conflicts: # Projects/App/Project.swift
…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
There was a problem hiding this 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 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RoundedRectangle과 뭐가 다른거죵?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
특정 모서리만 둥글게 할 수 있다는 것?🌀.🌀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
수고하셨습니다~
로직들 ViewModel 구현해서 붙여주면 끝나겠네요~
public extension UIScreen { | ||
static let screenWidth = UIScreen.main.bounds.width | ||
static let screenHeight = UIScreen.main.bounds.width | ||
} |
There was a problem hiding this comment.
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로 사용하는 건 어떨까요??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
오 좋습니다~! 반영했습니답~f3cfcab
.onSuccess { result in | ||
let ratio = geometry.size.width / result.image.size.width | ||
imageHeight = result.image.size.height * ratio | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.aspectRatio(비율, contentMode: <#T##ContentMode#>)
쓰면 더 깔끔할 것 같은데 다른 이유가 있을까요???
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public var levelStepText: String { | ||
switch self { | ||
case .level1: | ||
return "밈 보기" | ||
case .level2: | ||
return "ㅋ 남기기" | ||
case .level3: | ||
return "밈 공유" | ||
case .level4: | ||
return "밈 저장" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
요거는 순서가 static하게 정해져있는 걸까요???
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
private var currentLevelWidth: CGFloat { | ||
let width = (UIScreen.screenWidth - horizontalPadding * 2) / 20.0 * CGFloat(conditionCount) | ||
return width < minimumWidth ? minimumWidth : width | ||
} |
There was a problem hiding this comment.
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
사용하는 건 어떨까요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
제안 감사합니다~!
요 부분은 제가 개발한 뷰에서 전체 screenSize 에서 geometryReader 활용하는 걸로 변경했습니답!
801edc1
117d38e
to
d9ea49b
Compare
What is this PR? 🔍
이슈
마이페이지 UI 구현했습니다.
설명
Changes 📝
마이페이지 중에 level 달성 조건 뷰는 아직 미완성입니다요것도 됐습니답!
Screenshot 📸
To Reviewers 🙏