another.im-ios/ConversationsClassic/View/Screens/Attachments/AttachmentMediaPickerView.swift

58 lines
1.9 KiB
Swift
Raw Normal View History

2024-07-02 09:56:27 +00:00
import SwiftUI
2024-07-02 10:23:27 +00:00
2024-07-02 09:56:27 +00:00
struct AttachmentMediaPickerView: View {
2024-07-03 08:53:39 +00:00
// @StateObject private var mediaManager = MediaManager()
var hasCam: Bool = false
let elements = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J"]
2024-07-02 09:56:27 +00:00
var body: some View {
2024-07-02 10:23:27 +00:00
ScrollView {
2024-07-03 08:53:39 +00:00
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)
2024-07-02 10:23:27 +00:00
}
}
2024-07-02 09:56:27 +00:00
}
2024-07-03 08:53:39 +00:00
.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)
// }
// }
// }
2024-07-02 09:56:27 +00:00
}
}
}
2024-07-03 08:53:39 +00:00
struct AttachmentMediaPickerView_Previews: PreviewProvider {
static var previews: some View {
AttachmentMediaPickerView()
2024-07-02 09:56:27 +00:00
}
}