InfoView(text: "핸드폰 번호를 입력해주세요", imageName: "phone.fill")
.previewLayout(.sizeThatFits)
Preview에서 요로코롬 하면 안됨....
Xcode15이상부터
#Preview(traits: .sizeThatFitsLayout) {
InfoView(text: "핸드폰 번호를 입력해주세요", imageName: "phone.fill")
}
이렇게 해야 한다고 합니다라ㅏ
https://stackoverflow.com/questions/74429078/swiftui-preview-layout-size-that-fits-does-not-work
SwiftUI preview layout: size that fits does not work
I want my preview to only have the size of the view and not show the whole iPhone. I have already tried it with this code: struct TimerCardView: View { var body: some View { Te...
stackoverflow.com
'iOS' 카테고리의 다른 글
"near" 앱 개발기 - Tuist, MVVM, SwiftUI를 활용 (1) | 2025.04.30 |
---|---|
Swift - Alamofire Uikit(사자성어 앱 개발을 위한 공부) (0) | 2023.02.05 |