Skip to content

fix: 홈 일러스트 위치 수정#349

Open
jihun32 wants to merge 7 commits into
developfrom
fix/#339/TWI-122
Open

fix: 홈 일러스트 위치 수정#349
jihun32 wants to merge 7 commits into
developfrom
fix/#339/TWI-122

Conversation

@jihun32

@jihun32 jihun32 commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

@linear-code

linear-code Bot commented Jun 4, 2026

Copy link
Copy Markdown

TWI-122

@github-actions github-actions Bot added the D-3 label Jun 4, 2026
@clxxrlove

Copy link
Copy Markdown
Member

@coderabbitai summary

@clxxrlove clxxrlove left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

고생했어~~

Comment on lines +24 to +28
ScrollView {
goalEmptyView
.frame(width: geo.size.width)
.position(x: geo.size.width / 2, y: deviceCenterYInSection)
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

ScrollView 내부에서 높이가 모호한 상태로 .position(y:)를 쓰고 있어서 조금 불안정해질수도 있을 거 같은데
minHeight을 주고, 정렬하는건 어떨까??

ScrollView {
    goalEmptyView
        .frame(maxWidth: .infinity)
        .frame(minHeight: max(0, geo.size.height - TXTabBarLayout.height))

이렇게!!

@jihun32 jihun32 Jun 11, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

요구사항이 기기 기준 y축 center로 오는건데 예시 코드대로 하면 기기 기준이 아닌 ScrollView 기준 y축 center로 오더라구
(왼쪽 피그마, 오른쪽 예시 코드 적용)
image

그래서 기기 높이 구해서 position으로 셋팅한건데 확인해보고 더 좋은 방법 있으면 수정하고 아니면 머지할게 확인해줘~@clxxrlove

let frame = geo.frame(in: .global)
let deviceHeight = UIScreen.main.bounds.height
let deviceCenterYInSection = max(0, deviceHeight / 2 - frame.minY) 

ScrollView {
                    goalEmptyView
                        .frame(width: geo.size.width)
                        .position(x: geo.size.width / 2, y: deviceCenterYInSection)
                }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants