-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRunMainView.swift
More file actions
125 lines (125 loc) · 4.85 KB
/
RunMainView.swift
File metadata and controls
125 lines (125 loc) · 4.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
////
//// SwiftUIView.swift
//// MoveApp
////
//// Created by 이혜빈 on 10/17/24.
////
//
//
//
//import SwiftUI
//
//struct Meeting: Identifiable {
// let id = UUID()
// let title: String
// let location: String
// let time: String
// let members: String
//}
//
//struct RunMain: View {
// @State private var searchText: String = ""
// @FocusState private var isTextFieldFocused: Bool // 키보드 상태
//
// @State private var meetings = [
// Meeting(title: "영일대 석양 러닝", location: "포항시", time: "11.2(토) 오후 1:30", members: "3/8"),
// Meeting(title: "소통하며 러닝해요", location: "포항시", time: "11.3(일) 오후 1:30", members: "3/8"),
// Meeting(title: "마라톤 준비 러닝", location: "포항시", time: "11.3(일) 오후 1:30", members: "3/8"),
// Meeting(title: "트레일 러닝 갈 사람", location: "태백시", time: "11.3(일) 오후 1:30", members: "8/8"),
// Meeting(title: "트레일 러닝 갈 사람", location: "태백시", time: "11.3(일) 오후 1:30", members: "8/8"),
// Meeting(title: "트레일 러닝 갈 사람", location: "태백시", time: "11.3(일) 오후 1:30", members: "8/8"),
// Meeting(title: "트레일 러닝 갈 사람", location: "태백시", time: "11.3(일) 오후 1:30", members: "8/8"),
// Meeting(title: "트레일 러닝 갈 사람", location: "태백시", time: "11.3(일) 오후 1:30", members: "8/8")
// ]
//
//
// var filteredMeetings: [Meeting] {
// if searchText.isEmpty {
// return meetings
// } else {
// return meetings.filter { $0.title.contains(searchText) }
// }
// }
//
// var body: some View {
// NavigationView {
// VStack {
// HStack {
// Text("모임 탐색")
// .font(.largeTitle.bold())
// .padding(.vertical)
// Spacer()
// NavigationLink(destination: PostCreatView()) {
// Image(systemName: "plus")
// .font(.title)
// .padding()
// }
// }
// .padding(.horizontal)
//
// // 상단 검색창
// HStack {
// TextField("검색어", text: $searchText, prompt: Text("검색어를 입력하세요.")
// .foregroundColor(.black))
// .submitLabel(.search) // "검색" 버튼
// .autocorrectionDisabled(true)
// Image(systemName: "magnifyingglass")
// }
// .onAppear(perform: UIApplication.shared.hideKeyboard)
// .scrollDismissesKeyboard(.immediately)
// .padding(.horizontal, 10)
// .frame(width: 360, height: 50)
// .background(.cyan.opacity(0.1))
// .cornerRadius(12)
//
//
// // 모임 리스트
//
// List {
// ForEach(filteredMeetings) { meeting in
// NavigationLink(destination: PostDetailView(meeting: meeting)) {
// VStack(alignment: .leading) {
// Text(meeting.title)
// .font(.title2)
// HStack {
// Image(systemName: "location.circle.fill")
// Text(meeting.location)
// Spacer()
// Image(systemName: "calendar.circle.fill")
// Text(meeting.time)
// Spacer()
// HStack {
// Image(systemName: "person.3")
// Text(meeting.members)
// }
// }
// .font(.subheadline)
// .foregroundColor(.gray)
// }
// .padding(.vertical, 8)
// }
// }
// }
// .listStyle(PlainListStyle())
// }
// }
// }
//}
//
//// 텍스트 필드 편집이 끝났을 때 키보드 내리기 위한 View extension
//extension View {
// func endTextEditing() {
// UIApplication.shared.sendAction(
// #selector(UIResponder.resignFirstResponder),
// to: nil , from: nil, for: nil
// )
// }
//}
//
//
//struct MeetingListView_Previews: PreviewProvider {
// static var previews: some View {
// PostView()
// }
//}
//