Replaces screen edge gesture hack with preferredScreenEdgesDeferringSystemGestures
We want priority over system gestures when tapping near edges of screen. Previously, we needed to access the private screen edge gesture recognizer, but now we can use preferredScreenEdgesDeferringSystemGestures.
This commit is contained in:
parent
687d088827
commit
cb2caa7ef1
@ -33,12 +33,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate
|
||||
|
||||
self.configureAppearance()
|
||||
|
||||
// Disable system gestures that delay touches on left edge of screen
|
||||
for gestureRecognizer in self.window?.gestureRecognizers ?? [] where NSStringFromClass(type(of: gestureRecognizer)).contains("GateGesture")
|
||||
{
|
||||
gestureRecognizer.delaysTouchesBegan = false
|
||||
}
|
||||
|
||||
// Controllers
|
||||
ExternalGameControllerManager.shared.startMonitoring()
|
||||
|
||||
|
||||
@ -131,6 +131,10 @@ class GameViewController: DeltaCore.GameViewController
|
||||
return !self.isGyroActive
|
||||
}
|
||||
|
||||
override var preferredScreenEdgesDeferringSystemGestures: UIRectEdge {
|
||||
return .all
|
||||
}
|
||||
|
||||
required init()
|
||||
{
|
||||
super.init()
|
||||
|
||||
@ -34,6 +34,10 @@ class LaunchViewController: RSTLaunchViewController
|
||||
return self.gameViewController
|
||||
}
|
||||
|
||||
override var childForScreenEdgesDeferringSystemGestures: UIViewController? {
|
||||
return self.gameViewController
|
||||
}
|
||||
|
||||
override var shouldAutorotate: Bool {
|
||||
return self.gameViewController?.shouldAutorotate ?? true
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user