Skip to content

Commit

Permalink
Feat: Config에 데이터 연결 및 시뮬에서 확인
Browse files Browse the repository at this point in the history
  • Loading branch information
teabag759 committed May 22, 2024
1 parent f076400 commit 701ca8c
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 21 deletions.
6 changes: 3 additions & 3 deletions MC2-Team3-Pilling/View/ChooseStatusView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ struct ChooseStatusView: View {
}
.pickerStyle(.segmented)
// selection Print 되는 값 확인
// .onChange(of: selectedNum) { newValue in
// print("Selected number: \(newValue)")
// }
// .onChange(of: selectedNum) { newValue in
// print("Selected number: \(newValue)")
// }

// 복용시간 버튼
Button(action: {
Expand Down
11 changes: 5 additions & 6 deletions MC2-Team3-Pilling/View/MedicineSheetView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ import SwiftUI

struct MedicineSheetView: View {
@State private var searchText = ""
@Binding var showingMedicineSheet: Bool
// @State var showingMedicineSheet = false
// @Binding var showingMedicineSheet: Bool

@Binding var selectedPill: PillInfo?

Expand All @@ -27,7 +26,7 @@ struct MedicineSheetView: View {
List(filteredBirthControl) { pill in
Button(action: {
selectedPill = pill
showingMedicineSheet = false
// showingMedicineSheet = false
}) {
Text(pill.pillName)
}
Expand All @@ -43,7 +42,7 @@ struct MedicineSheetView: View {

// footer button
Button(action: {
self.showingMedicineSheet = false
// self.showingMedicineSheet = false
}, label: {
Text("설정완료!")
.largeBold()
Expand Down Expand Up @@ -84,7 +83,7 @@ extension View {


#Preview {

// MedicineSheetView()
// MedicineSheetView()
OnboardingFirstView()
}
8 changes: 4 additions & 4 deletions MC2-Team3-Pilling/View/OnboardingFirstView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ struct OnboardingFirstView: View {
.foregroundColor(.secondary)
.padding([.leading, .trailing], 16)
.sheet(isPresented: $showingMedicineSheet){
// MedicineSheetView(showingMedicineSheet: true)
MedicineSheetView(showingMedicineSheet: $showingMedicineSheet, selectedPill: $selectedPill)
MedicineSheetView(selectedPill: $selectedPill)
// MedicineSheetView(showingMedicineSheet: $showingMedicineSheet, selectedPill: $selectedPill)
.presentationDetents([.medium])
}

Expand Down Expand Up @@ -79,7 +79,7 @@ struct OnboardingFirstView: View {
// footer button
Button(action: {
// OnboardingView02()

}, label: {
Text("다음으로")
.largeBold()
Expand All @@ -91,7 +91,7 @@ struct OnboardingFirstView: View {
.foregroundColor(.black)
.padding()
}

}

#Preview {
Expand Down
8 changes: 4 additions & 4 deletions MC2-Team3-Pilling/View/OnboardingSecondView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,17 @@ struct OnboardingSecondView: View {

Button(action: {
}, label: {

ZStack{
HStack {
Image(systemName: "clock")
Text("복용 시간")
.secondaryTitle()
Spacer()

}
DatePicker("", selection: $alarmTime, displayedComponents: .hourAndMinute)

}
.padding([.leading, .trailing], 20)

Expand All @@ -61,7 +61,7 @@ struct OnboardingSecondView: View {
Toggle("소리 알람여부추가", isOn: $alarmToggle)
.regular()
.padding(.bottom, 2)



HStack {
Expand Down
4 changes: 2 additions & 2 deletions MC2-Team3-Pilling/View/PopoverView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ struct PopoverView: View {

}
.frame(width: 45, height: 45)

Text("피임약 2알 복용")
}
.padding(.bottom)
Expand All @@ -64,7 +64,7 @@ struct PopoverView: View {
.stroke(Color.green,lineWidth: 3)

)

Text("현재")
}
}
Expand Down
4 changes: 2 additions & 2 deletions MC2-Team3-Pilling/View/SettingView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ struct SettingView: View {
}
Section("알림") {
DatePicker("시간", selection: $selectedAlarmTime, displayedComponents: .hourAndMinute)

Toggle("알람", isOn: $isSoundOn)

}
Expand All @@ -49,7 +49,7 @@ struct SettingView: View {
Text("Pills")
.presentationDetents([.height(300), .large])
})

}
}
}
Expand Down

0 comments on commit 701ca8c

Please sign in to comment.