58 lines
1.9 KiB
Swift
58 lines
1.9 KiB
Swift
import SwiftUI
|
|
|
|
struct AttachmentMediaPickerView: View {
|
|
// @StateObject private var mediaManager = MediaManager()
|
|
|
|
var hasCam: Bool = false
|
|
|
|
let elements = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J"]
|
|
|
|
var body: some View {
|
|
ScrollView {
|
|
LazyVGrid(columns: Array(repeating: .init(.flexible()), count: 3)) {
|
|
ForEach(0 ..< 10) { index in
|
|
if index == 0 {
|
|
VStack {
|
|
Color.red
|
|
.frame(height: 100)
|
|
Color.red
|
|
.frame(height: 100)
|
|
}
|
|
} else {
|
|
Color.blue
|
|
.frame(height: 100)
|
|
}
|
|
}
|
|
}
|
|
.padding(.horizontal)
|
|
// LazyVGrid(columns: [GridItem(), GridItem(), GridItem()]) {
|
|
// if let cameraFeed = mediaManager.cameraFeed {
|
|
// Button(action: {
|
|
// isPickerPresented = true
|
|
// }) {
|
|
// Image(uiImage: cameraFeed)
|
|
// .resizable()
|
|
// .aspectRatio(contentMode: .fill)
|
|
// }
|
|
// }
|
|
//
|
|
// ForEach(mediaManager.photos, id: \.self) { photo in
|
|
// Button(action: {
|
|
// selectedPhoto = photo
|
|
// }) {
|
|
// Image(uiImage: photo)
|
|
// .resizable()
|
|
// .aspectRatio(contentMode: .fill)
|
|
// }
|
|
// }
|
|
// }
|
|
}
|
|
}
|
|
}
|
|
|
|
struct AttachmentMediaPickerView_Previews: PreviewProvider {
|
|
static var previews: some View {
|
|
AttachmentMediaPickerView()
|
|
}
|
|
}
|