@@ -14,78 +14,71 @@ struct RecommendView: View {
1414 // @StateObject private var viewModel = DietaryViewModel() //디버깅용
1515
1616 @State private var isFoldRecommand : Bool = false // true : 펼친상태로 시작 , false: 가려진 채로 시작.
17- @State private var contentHeight : CGFloat = 0
17+ // @State private var contentHeight : CGFloat = 0
1818
1919 var body : some View {
2020 ZStack {
2121 Color ( . backGround) . ignoresSafeArea ( edges: . all)
2222
23- ScrollView {
24- VStack { //컨테이너 뷰의 높이
25- ContainerView ( paddingSize: 16 ,
26- height: 1000 )
27- {
28- HStack {
29- VStack {
30- Text ( " 추천 레시피에 등록된 재료를 이용해 식사를 추천합니다. " )
31- . font ( . pretendardSemiBold10)
32- . foregroundStyle ( . textFieldGray)
33- . border ( . black)
34-
35- //MARK: - 안에 컨텐츠.
36- ScrollView {
37- LazyVStack ( alignment: . leading, spacing: 16 ) {
38- ForEach ( viewModel. recommendList, id : \. title) { item in
39- VStack ( alignment: . leading, spacing: 8 ) {
40- Text ( item. title)
41- . font ( . pretendardBold24)
42- Text ( item. description)
43- . font ( . pretendardSemiBold16)
44- }
45- . border ( . black)
23+ VStack {
24+ ContainerView ( paddingSize: 16 ) {
25+ HStack {
26+ VStack {
27+ Text ( " 추천 레시피에 등록된 재료를 이용해 식사를 추천합니다. " )
28+ . font ( . pretendardSemiBold10)
29+ . foregroundStyle ( . textFieldGray)
30+
31+ ScrollView {
32+ LazyVStack ( alignment: . leading, spacing: 16 ) {
33+ ForEach ( viewModel. recommendList, id: \. title) { item in
34+ VStack ( alignment: . leading, spacing: 8 ) {
35+ Text ( item. title)
36+ . font ( . pretendardBold24)
37+ Text ( item. description)
38+ . font ( . pretendardSemiBold16)
4639 }
40+ . padding ( )
41+ . backgroundStyle ( Color . textFieldGray)
42+ . border ( Color . appMain)
43+ Divider ( )
4744 }
48- . background (
49-
50- )
51- }
52- . frame ( height: 800 )
53- . clipped ( )
54- . padding ( . top, 8 )
55- . border ( . black)
56-
57- Spacer ( )
58-
59- Button {
60- withAnimation ( . bouncy) {
61- isFoldRecommand. toggle ( )
62- }
63- } label: {
64- Image ( systemName: isFoldRecommand ? " chevron.up " : " chevron.down " )
65- . frame ( width: 10 , height: 10 )
66- . font ( . pretendardBold20)
6745 }
68- . padding ( . bottom, 8 )
69- . border ( . black)
70-
46+ . padding ( . horizontal)
7147 }
48+ . clipped ( )
49+
50+ // Spacer()
51+ //
52+ // Button {
53+ // withAnimation(.bouncy) {
54+ // isFoldRecommand.toggle()
55+ // }
56+ // } label: {
57+ // Image(systemName: isFoldRecommand ? "chevron.up" : "chevron.down")
58+ // .frame(width: 10, height: 10)
59+ // .font(.pretendardBold20)
60+ // }
61+ // .padding(.bottom, 8)
62+ // .border(.black)
7263 }
73- . padding ( )
7464 }
75- . padding ( . bottom , 10 )
65+ . padding ( )
7666 }
67+ . padding ( . bottom, 10 )
7768 }
7869 . padding ( . top, 16 )
70+
71+
7972 }
8073 . navigationTitle ( " 추천 식사 " )
8174 . navigationBarTitleDisplayMode ( . inline)
8275 . font ( . pretendardBold16)
83- . progressOverlay ( isPresented: $viewModel. isPresneted, message: " Alan이 식단을 생성하고 있어요 ! " ) //로딩
76+ . progressOverlay ( isPresented: $viewModel. isPresneted, message: " Alan이 식단을 생성하고 있어요 ! " )
8477 . toastView ( toast: $viewModel. toast)
78+
8579 }
8680}
87-
88- //디버깅용
81+ ////디버깅용
8982//#Preview {
9083// NavigationStack{
9184// RecommendView()
0 commit comments