зеркало из https://github.com/nextcloud/talk-ios.git
27 строки
633 B
Swift
27 строки
633 B
Swift
//
|
|
// SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
//
|
|
|
|
import UIKit
|
|
|
|
extension UIPageViewController {
|
|
|
|
// https://stackoverflow.com/a/47075283
|
|
func enableSwipeGesture() {
|
|
for view in self.view.subviews {
|
|
if let subView = view as? UIScrollView {
|
|
subView.isScrollEnabled = true
|
|
}
|
|
}
|
|
}
|
|
|
|
func disableSwipeGesture() {
|
|
for view in self.view.subviews {
|
|
if let subView = view as? UIScrollView {
|
|
subView.isScrollEnabled = false
|
|
}
|
|
}
|
|
}
|
|
}
|