APP-iOS3rd / PJ3T2_Mymory

멋쟁이사자처럼 iOS 앱스쿨 3기 팀 프로젝트
10 stars 3 forks source link

[Feat]: 각종 뷰 개선(로그인, 작성 뷰) #169

Closed xohxe closed 7 months ago

xohxe commented 7 months ago

PR 가이드라인

PR Checklist

PR 날릴 때 체크 리스트

PR Type

어떤 종류의 PR인가요?

연관되는 issue 정보를 알려주세요

Issue Number: N/A

PR 설명하기

메모작성뷰, 로그인 뷰 UI를 가다듬었어요.

어떻게 작동하나요? code 기반으로 설명해주세요

텍스트에디터의 placeholder를 background를 통해 구현했습니다. overlay로도 가능하지만, overlay로 구현할 경우에는 텍스트 부위를 터치할 경우 입력기능이 활성화되지 않아 background로 수정했어요.

  TextEditor(text: $viewModel.memoContents)
            .padding(.horizontal, -4) // 자체 padding? 제거
            .scrollContentBackground(.hidden)
            .frame(minHeight: minHeight, maxHeight: maxHeight)
            .foregroundColor(.textColor)
            .background(
                Text(viewModel.memoContents.isEmpty ? "본문을 입력해주세요." : "")
                    .foregroundStyle(Color.borderColor)
                    .font(.semibold20)
                    .frame(maxWidth: .infinity, alignment: .topLeading)
                    .padding(.vertical, 8)

                ,alignment: .topLeading
            )

가능하다면 추가해주세요

변경 사항 스크린샷