diff --git a/IceCubesApp/App/Main/IceCubesApp+Scene.swift b/IceCubesApp/App/Main/IceCubesApp+Scene.swift index 6e314187..b8b9da4b 100644 --- a/IceCubesApp/App/Main/IceCubesApp+Scene.swift +++ b/IceCubesApp/App/Main/IceCubesApp+Scene.swift @@ -26,11 +26,20 @@ extension IceCubesApp { .environment(appIntentService) .environment(\.isSupporter, isSupporter) .sheet(item: $quickLook.selectedMediaAttachment) { selectedMediaAttachment in - MediaUIView(selectedAttachment: selectedMediaAttachment, - attachments: quickLook.mediaAttachments) + if #available(iOS 18.0, *) { + MediaUIView(selectedAttachment: selectedMediaAttachment, + attachments: quickLook.mediaAttachments) + .presentationBackground(.ultraThinMaterial) + .presentationCornerRadius(16) + .presentationSizing(.page) + .withEnvironments() + } else { + MediaUIView(selectedAttachment: selectedMediaAttachment, + attachments: quickLook.mediaAttachments) .presentationBackground(.ultraThinMaterial) .presentationCornerRadius(16) .withEnvironments() + } } .onChange(of: pushNotificationsService.handledNotification) { _, newValue in if newValue != nil { diff --git a/Packages/MediaUI/Sources/MediaUI/MediaUIAttachmentImageView.swift b/Packages/MediaUI/Sources/MediaUI/MediaUIAttachmentImageView.swift index e43a4c20..0122413c 100644 --- a/Packages/MediaUI/Sources/MediaUI/MediaUIAttachmentImageView.swift +++ b/Packages/MediaUI/Sources/MediaUI/MediaUIAttachmentImageView.swift @@ -16,6 +16,8 @@ public struct MediaUIAttachmentImageView: View { .clipShape(RoundedRectangle(cornerRadius: 8)) .scaledToFit() .padding(.horizontal, 8) + .padding(.top, 44) + .padding(.bottom, 32) .scaleEffect(zoom) } else if state.isLoading { ProgressView() diff --git a/Packages/MediaUI/Sources/MediaUI/MediaUIView.swift b/Packages/MediaUI/Sources/MediaUI/MediaUIView.swift index a88ad80b..4ec136f2 100644 --- a/Packages/MediaUI/Sources/MediaUI/MediaUIView.swift +++ b/Packages/MediaUI/Sources/MediaUI/MediaUIView.swift @@ -93,7 +93,6 @@ private struct DismissToolbarItem: ToolbarContent { } label: { Image(systemName: "xmark.circle") } - .opacity(0) .keyboardShortcut(.cancelAction) } }