Struct 'ViewBuilder' requires that 'EmptyTableRowContent<V>' conform to 'View'
Struct 'ViewBuilder' requires that 'TableHeaderRowContent<V, Text>' conform to 'View'
Static method 'buildExpression' requires that 'HStack<TupleView<(Text, Spacer, Text)>>' conform to 'TableRowContent'
모델을 좀 통폐합 시키다보니 갑자기 뷰쪽에서 이러한 에러들이 떳다
처음엔 단순히 실수로 괄호가 지워졌나 싶었는데 아무리봐도 틀린부분이 없었다
검색해보니 바인딩에러니 어쩌니 하길래 @붙은 부분을 전부 확인해봐도 모르겠다....
그렇게 이것저것 검색하고 안되고, 세번째 에러 부분을 검색하다가
스택오버플로우의 한 댓글을 발견
You seems to do some strange additions in your Text : not sure dayOfWeek is a string. To find out where the problem is : comment your HStack in the ForEach and add them one by one to find the falty one. The compiler gives sometimes error on ForEach when something is wrong in the code inside it.
Text부분의 이상한 확장이 있는거 같다는글에 관련된 뷰에 있는 텍스트 코드들을 전부 주석처리하니 에러가 사라짐을 발견
내가 모델을 수정하면서 date 변수를 created와 deadLine으로 분리해놓은걸 깜빡했다.
왜 date변수가 없어요! 라는 에러가 안뜨고 이상한 에러가 떳는지 모르겠다.
preview.date 부분을 멀쩡한걸로 변경해주니 다시 돌아간다....
이번달안으로 끝내기로 마음먹은 프로젝트가 진도가 안나간다
'iOS > swift' 카테고리의 다른 글
UIColor to Color?, 기존 uicolor색상을 swiftui 에서 사용하기 (0) | 2025.04.21 |
---|---|
background audio play - 5 [SwiftUI로 변경] (0) | 2025.03.26 |
background audio play - 4 [mvvm 패턴] (1) | 2024.11.27 |
background audio play - 3 [제어센터에서의 컨트롤] (5) | 2024.11.10 |
background audio play - 2 [AVAudioSession] (1) | 2024.09.15 |