-
Notifications
You must be signed in to change notification settings - Fork 2
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 [#5] App Picker SwiftUI button 구현 #12
Conversation
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.
구현 수고 많으셨습니다~👍👏🏽🍀
.frame(width: 336, height: 52) | ||
.background(Color(uiColor: .bluePurpleButton)) | ||
} | ||
.familyActivityPicker(isPresented: $isPresented, selection: $model.newSelection) |
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.
맞습니다~ picker뷰를 띄워서 model에 저장하는 부분입니다!
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.
p5. SwiftUI 처음이실텐데 진짜 고생하셨습니다!!!!
// Created by 지희의 MAC on 1/4/24. | ||
// | ||
|
||
import Foundation |
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.
p5.이 친구는 왜 혼자 쓸쓸하게 있는걸까요??
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.
추후에 사용될 파일입니다!
|
||
var body: some View { | ||
ZStack { | ||
Color(uiColor: .clear) |
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.
p5.스유에서는 UIColor가 아니라 uiColor라고 쓰나요?!?
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.
넵 여기서는 UIColor 대신 Color를 사용합니다! Color의 내장함수입니다~
👾 작업 내용
SwiftUI를 이용해서 구현해야하는 App Picker 버튼을 구현했습니다.
🚀 PR Point
contentViewController.view
형식으로 사용해야합니다. 이 부분 더 좋은 코드 있을지 더 고민해보겠습니다.SwiftUI
의 View를UIkit
에서 사용하는 과정에서, AutoLayout을 잡으면, SwiftUI의 ContentsView가 하나의 뷰로 간주되어, 터치 영역이 텍스트 부분에만 잡히게 되었습니다. 이 문제를 해결하기 위해 RoundedRect 뷰를 아래에 두고, 그 위에 Button 크기가를 고정해두어 터치 영역을 잡아뒀습니다.📸 스크린샷
✅ Issue
Resolved #5