Compare commits
2 Commits
master
...
a11y-modal
| Author | SHA1 | Date | |
|---|---|---|---|
| 172dfc60eb | |||
| 3c40c29561 |
@@ -13,7 +13,7 @@ class ClippedContainerViewController: UIViewController {
|
||||
let viewController: UIViewController
|
||||
|
||||
private let options: ContextMenu.Options
|
||||
private let containedViewController: UINavigationController
|
||||
private let containedViewController: ModalNavigationViewController
|
||||
|
||||
override var preferredStatusBarStyle: UIStatusBarStyle {
|
||||
return viewController.preferredStatusBarStyle
|
||||
@@ -22,7 +22,7 @@ class ClippedContainerViewController: UIViewController {
|
||||
init(options: ContextMenu.Options, viewController: UIViewController) {
|
||||
self.viewController = viewController
|
||||
self.options = options
|
||||
self.containedViewController = UINavigationController(rootViewController: viewController)
|
||||
self.containedViewController = ModalNavigationViewController(rootViewController: viewController)
|
||||
super.init(nibName: nil, bundle: nil)
|
||||
self.containedViewController.delegate = self
|
||||
}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
//
|
||||
// ModalNavigationViewController.swift
|
||||
// ContextMenu
|
||||
//
|
||||
// Created by Bas Broek on 01/04/2019.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
class ModalNavigationViewController: UINavigationController {
|
||||
override var accessibilityViewIsModal: Bool {
|
||||
get { return true }
|
||||
set {}
|
||||
}
|
||||
|
||||
override func accessibilityPerformEscape() -> Bool {
|
||||
dismiss(animated: UIAccessibility.isReduceMotionEnabled == false)
|
||||
return true
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user