From c05708a285046390c6813edb30b338c3671891a0 Mon Sep 17 00:00:00 2001 From: Marino Faggiana Date: Fri, 13 Nov 2026 10:14:27 +0100 Subject: [PATCH] fix: restore default top scroll edge effects on iOS 27 Signed-off-by: Marino Faggiana --- iOSClient/Activity/NCActivity.swift | 1 - iOSClient/Albums/AlbumsViewController.swift | 2 +- iOSClient/Extensions/UIView+Extension.swift | 8 -------- iOSClient/Extensions/View+Extension.swift | 9 --------- iOSClient/GUI/ViewOnAppear.swift | 1 - .../Main/Collection Common/NCCollectionViewCommon.swift | 1 - iOSClient/Notification/NCNotification.swift | 1 - iOSClient/Select/NCSelect.swift | 1 - iOSClient/Settings/AutoUpload/NCAutoUploadView.swift | 1 - iOSClient/Settings/Helpers/NCAcknowledgementsView.swift | 1 - iOSClient/Settings/SelectAlbum/SelectAlbumView.swift | 1 - iOSClient/Trash/NCTrash.swift | 2 -- 12 files changed, 1 insertion(+), 28 deletions(-) diff --git a/iOSClient/Activity/NCActivity.swift b/iOSClient/Activity/NCActivity.swift index dfb5aa76b1..94d6ea86c8 100644 --- a/iOSClient/Activity/NCActivity.swift +++ b/iOSClient/Activity/NCActivity.swift @@ -64,7 +64,6 @@ class NCActivity: UIViewController, NCSharePagingContent { tableView.separatorColor = UIColor.clear tableView.contentInset = insets tableView.backgroundColor = usesGroupedBackground ? .systemGroupedBackground : .systemBackground - tableView.hideTopScrollEdgeEffect() if showComments { setupComments() diff --git a/iOSClient/Albums/AlbumsViewController.swift b/iOSClient/Albums/AlbumsViewController.swift index 7daffa500a..09685e88b6 100644 --- a/iOSClient/Albums/AlbumsViewController.swift +++ b/iOSClient/Albums/AlbumsViewController.swift @@ -132,7 +132,7 @@ class AlbumsViewController: UIViewController { } } .store(in: &cancellables) - let content = AnyView(rootView.id(account).environment(\.localAccount, account).hideTopScrollEdgeEffect()) + let content = AnyView(rootView.id(account).environment(\.localAccount, account)) if let hostingController { hostingController.rootView = content diff --git a/iOSClient/Extensions/UIView+Extension.swift b/iOSClient/Extensions/UIView+Extension.swift index 4c34a21149..0aef8205fe 100644 --- a/iOSClient/Extensions/UIView+Extension.swift +++ b/iOSClient/Extensions/UIView+Extension.swift @@ -35,11 +35,3 @@ extension UIView { } } } - -extension UIScrollView { - func hideTopScrollEdgeEffect() { - if #available(iOS 27.0, *) { - topEdgeEffect.isHidden = true - } - } -} diff --git a/iOSClient/Extensions/View+Extension.swift b/iOSClient/Extensions/View+Extension.swift index ef52386480..47b0b65ff7 100644 --- a/iOSClient/Extensions/View+Extension.swift +++ b/iOSClient/Extensions/View+Extension.swift @@ -19,15 +19,6 @@ extension View { isHidden ? AnyView(self.hidden()) : AnyView(self) } - @ViewBuilder - func hideTopScrollEdgeEffect() -> some View { - if #available(iOS 27.0, *) { - scrollEdgeEffectHidden(for: .top) - } else { - self - } - } - /// Applies the given transform if the given condition evaluates to `true`. /// - Parameters: /// - condition: The condition to evaluate. diff --git a/iOSClient/GUI/ViewOnAppear.swift b/iOSClient/GUI/ViewOnAppear.swift index cd9bf53e53..e3ba61f4ba 100644 --- a/iOSClient/GUI/ViewOnAppear.swift +++ b/iOSClient/GUI/ViewOnAppear.swift @@ -24,7 +24,6 @@ struct DefaultViewModifier: ViewModifier { func body(content: Content) -> some View { content - .hideTopScrollEdgeEffect() .onAppear { viewModel.onViewAppear() // Call onViewAppear on view appearance } diff --git a/iOSClient/Main/Collection Common/NCCollectionViewCommon.swift b/iOSClient/Main/Collection Common/NCCollectionViewCommon.swift index 0359f5ac34..e80ef9ce87 100644 --- a/iOSClient/Main/Collection Common/NCCollectionViewCommon.swift +++ b/iOSClient/Main/Collection Common/NCCollectionViewCommon.swift @@ -198,7 +198,6 @@ class NCCollectionViewCommon: UIViewController, NCAccountSettingsModelDelegate, self.navigationController?.presentationController?.delegate = self collectionView.alwaysBounceVertical = true collectionView.accessibilityIdentifier = "NCCollectionViewCommon" - collectionView.hideTopScrollEdgeEffect() view.backgroundColor = .systemBackground collectionView.backgroundColor = .systemBackground diff --git a/iOSClient/Notification/NCNotification.swift b/iOSClient/Notification/NCNotification.swift index 1678d7e056..b8a7f43d11 100644 --- a/iOSClient/Notification/NCNotification.swift +++ b/iOSClient/Notification/NCNotification.swift @@ -38,7 +38,6 @@ class NCNotification: UITableViewController, NCNotificationCellDelegate { tableView.rowHeight = UITableView.automaticDimension tableView.estimatedRowHeight = 50.0 tableView.backgroundColor = .systemBackground - tableView.hideTopScrollEdgeEffect() refreshControl?.action(for: .valueChanged) { _ in Task { diff --git a/iOSClient/Select/NCSelect.swift b/iOSClient/Select/NCSelect.swift index e0cd77d9a9..9f2d74cc5d 100644 --- a/iOSClient/Select/NCSelect.swift +++ b/iOSClient/Select/NCSelect.swift @@ -75,7 +75,6 @@ class NCSelect: UIViewController, UIGestureRecognizerDelegate, UIAdaptivePresent view.backgroundColor = .systemBackground collectionView.backgroundColor = .systemBackground - collectionView.hideTopScrollEdgeEffect() selectCommandViewSelect?.separatorView.backgroundColor = .separator diff --git a/iOSClient/Settings/AutoUpload/NCAutoUploadView.swift b/iOSClient/Settings/AutoUpload/NCAutoUploadView.swift index 9c60c346f4..af9f203d28 100644 --- a/iOSClient/Settings/AutoUpload/NCAutoUploadView.swift +++ b/iOSClient/Settings/AutoUpload/NCAutoUploadView.swift @@ -38,7 +38,6 @@ struct NCAutoUploadView: View { noPermissionsView } } - .hideTopScrollEdgeEffect() .navigationBarTitle(NSLocalizedString("_auto_upload_folder_", comment: "")) .navigationBarTitleDisplayMode(.inline) .toolbar { diff --git a/iOSClient/Settings/Helpers/NCAcknowledgementsView.swift b/iOSClient/Settings/Helpers/NCAcknowledgementsView.swift index bd466b61fa..8d01a4d0d6 100644 --- a/iOSClient/Settings/Helpers/NCAcknowledgementsView.swift +++ b/iOSClient/Settings/Helpers/NCAcknowledgementsView.swift @@ -53,7 +53,6 @@ struct NCAcknowledgementsView: View { } } } - .hideTopScrollEdgeEffect() .navigationBarTitle(Text(NSLocalizedString("_autoupload_description_", comment: "")), displayMode: .inline) .onAppear { loadRTF() diff --git a/iOSClient/Settings/SelectAlbum/SelectAlbumView.swift b/iOSClient/Settings/SelectAlbum/SelectAlbumView.swift index 76106e35f7..451189ff24 100644 --- a/iOSClient/Settings/SelectAlbum/SelectAlbumView.swift +++ b/iOSClient/Settings/SelectAlbum/SelectAlbumView.swift @@ -24,7 +24,6 @@ struct SelectAlbumView: View { AlbumView(model: model, selectedAlbums: $selectedAlbums, albums: model.userAlbums, sectionTitle: "_albums_") } } - .hideTopScrollEdgeEffect() .safeAreaInset(edge: .bottom, content: { Spacer().frame(height: 30) }) diff --git a/iOSClient/Trash/NCTrash.swift b/iOSClient/Trash/NCTrash.swift index 0120903f06..2902fdc94a 100644 --- a/iOSClient/Trash/NCTrash.swift +++ b/iOSClient/Trash/NCTrash.swift @@ -70,8 +70,6 @@ class NCTrash: UIViewController, NCTrashListCellDelegate, NCTrashGridCellDelegat collectionView.alwaysBounceVertical = true collectionView.backgroundColor = .systemBackground - collectionView.hideTopScrollEdgeEffect() - listLayout = NCListLayout() gridLayout = NCGridLayout()