Skip to content

Commit

Permalink
[Feat] CalanderView 삭제 (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaminleee committed Dec 19, 2023
1 parent 6b90150 commit 3a4a01e
Show file tree
Hide file tree
Showing 2 changed files with 81 additions and 3 deletions.
12 changes: 12 additions & 0 deletions ToMeetToMe/ToMeetToMe.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@
86C4FC7F2B137E7E006878F4 /* MeetingMemberView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 86C4FC7E2B137E7E006878F4 /* MeetingMemberView.swift */; };
86C4FC812B137E93006878F4 /* MeetingInfoView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 86C4FC802B137E93006878F4 /* MeetingInfoView.swift */; };
86C4FC832B137F65006878F4 /* RecommendView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 86C4FC822B137F65006878F4 /* RecommendView.swift */; };
EDD8788B2B31B8E400BFDCDF /* PickPromiseDateView.swift in Sources */ = {isa = PBXBuildFile; fileRef = EDD8788A2B31B8E400BFDCDF /* PickPromiseDateView.swift */; };
EDD8788D2B31B93B00BFDCDF /* SettingPromiseInfoView.swift in Sources */ = {isa = PBXBuildFile; fileRef = EDD8788C2B31B93B00BFDCDF /* SettingPromiseInfoView.swift */; };
EDD8788F2B31C3F600BFDCDF /* PhotoPicker.swift in Sources */ = {isa = PBXBuildFile; fileRef = EDD8788E2B31C3F600BFDCDF /* PhotoPicker.swift */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
Expand Down Expand Up @@ -113,6 +116,9 @@
86C4FC7E2B137E7E006878F4 /* MeetingMemberView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MeetingMemberView.swift; sourceTree = "<group>"; };
86C4FC802B137E93006878F4 /* MeetingInfoView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MeetingInfoView.swift; sourceTree = "<group>"; };
86C4FC822B137F65006878F4 /* RecommendView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RecommendView.swift; sourceTree = "<group>"; };
EDD8788A2B31B8E400BFDCDF /* PickPromiseDateView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PickPromiseDateView.swift; sourceTree = "<group>"; };
EDD8788C2B31B93B00BFDCDF /* SettingPromiseInfoView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingPromiseInfoView.swift; sourceTree = "<group>"; };
EDD8788E2B31C3F600BFDCDF /* PhotoPicker.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PhotoPicker.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -172,6 +178,7 @@
619FADA92AE4F9DA00AB5511 /* String+extensions.swift */,
619FADAB2AE506D700AB5511 /* Date+extensions.swift */,
6187188C2AFDFAED0011480D /* Utilities.swift */,
EDD8788E2B31C3F600BFDCDF /* PhotoPicker.swift */,
);
path = Extensions;
sourceTree = "<group>";
Expand Down Expand Up @@ -282,6 +289,8 @@
61DF8C1C2B1DE05D008AEBF5 /* Group */ = {
isa = PBXGroup;
children = (
EDD8788A2B31B8E400BFDCDF /* PickPromiseDateView.swift */,
EDD8788C2B31B93B00BFDCDF /* SettingPromiseInfoView.swift */,
);
path = Group;
sourceTree = "<group>";
Expand Down Expand Up @@ -490,6 +499,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
EDD8788F2B31C3F600BFDCDF /* PhotoPicker.swift in Sources */,
618718822AFD3E710011480D /* UserAuthModel.swift in Sources */,
86AE6B022ADBD1130092A1FE /* AddGroupView.swift in Sources */,
86AE6AFA2ADBCE1E0092A1FE /* AddFriendListCell.swift in Sources */,
Expand All @@ -510,6 +520,7 @@
86C4FC832B137F65006878F4 /* RecommendView.swift in Sources */,
86C4FC7D2B137E65006878F4 /* MemberView.swift in Sources */,
61AF912C2AD4778A009563E3 /* PromiseView.swift in Sources */,
EDD8788B2B31B8E400BFDCDF /* PickPromiseDateView.swift in Sources */,
61AF91402AD6299D009563E3 /* FriendGridView.swift in Sources */,
86AE6B222AE5633F0092A1FE /* MyPageView.swift in Sources */,
61AF912E2AD477A4009563E3 /* ProfileView.swift in Sources */,
Expand All @@ -518,6 +529,7 @@
86AE6B1E2AE562E50092A1FE /* FriendListCell.swift in Sources */,
86AE6B2A2AE566D40092A1FE /* MainButtonView.swift in Sources */,
619FADAE2AE5126200AB5511 /* DetailDayScheduleView.swift in Sources */,
EDD8788D2B31B93B00BFDCDF /* SettingPromiseInfoView.swift in Sources */,
619FADB02AE51DD100AB5511 /* AddScheduleView.swift in Sources */,
616FF7602B0898F80011B7DB /* PromiseConfirmationView.swift in Sources */,
6187188D2AFDFAED0011480D /* Utilities.swift in Sources */,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,74 @@
//
// PickPromiseDateView.swift
// PickDateView.swift
// ToMeetToMe
//
// Created by 이자민 on 12/19/23.
// Created by 이자민 on 2023/11/05.
//

import Foundation
import SwiftUI

struct PickPromiseDateView: View {
@State private var date = Date()
let dateRange: ClosedRange<Date> = {
let calendar = Calendar.current
let startComponents = DateComponents(hour: 22, minute: 59, second: 59)
let endComponents = DateComponents(hour: 23, minute: 00, second: 00)
return calendar.date(from:startComponents)!
...
calendar.date(from:endComponents)!
}()

@State private var vibrateOnRing = true

var body: some View {


NavigationView{

VStack(){
Text("약속을 생성할 기간을\n선택해주세요 :)")
.font(Font.custom("Pretendard", size: 16))
.foregroundColor(Color.black)
.frame(maxWidth: .infinity, alignment: .leading) // 좌측 정렬

Spacer()

Toggle("하루종일", isOn: $vibrateOnRing)
.toggleStyle(SwitchToggleStyle(tint: Color.primaryColor))
.frame(maxWidth: .infinity, alignment: .topLeading)
.padding(EdgeInsets(top: 0, leading: 0, bottom: 0, trailing: 220))


if !vibrateOnRing { // Toggle이 true일 때만 DatePicker를 표시
Text("약속 시간대를 선택해주세요 !")
.font(Font.custom("Pretendard", size: 16))
.foregroundColor(Color.black)
.frame(maxWidth: .infinity, alignment: .leading)

HStack {
DatePicker("", selection: $date, in: dateRange, displayedComponents: [.hourAndMinute])
DatePicker("", selection: $date, in: dateRange, displayedComponents: [.hourAndMinute])
.padding(EdgeInsets(top: 0, leading: 0, bottom: 0, trailing: 140))
Spacer()
}
}



}
.padding(.horizontal, 024)
.navigationTitle("약속 생성")
.navigationBarTitleDisplayMode(.inline)
.navigationBarItems(trailing: Text("확인"))

}

}


}
struct PickPromiseDateView_Previews: PreviewProvider {
static var previews: some View {
PickPromiseDateView()
}
}

0 comments on commit 3a4a01e

Please sign in to comment.