If a UIViewController
is launched in landscape mode, even though the home indicator
is not on the right side, still the rightmost 44 points on the screen do not respond to touches. I am wondering what is the purpose of disabling those pixels for touches and is there a way to extend the touch area on the right?
Asked
Active
Viewed 437 times
0

Jack
- 13,571
- 6
- 76
- 98

Deepak Sharma
- 5,577
- 7
- 55
- 131
-
Can you post any relevant code? What view are you using the detect touches and what are its constraints? – nathangitter Nov 13 '17 at 17:20
1 Answers
0
When the view is visible onscreen, this guide reflects the portion of the view that is not covered by navigation bars, tab bars, toolbars, and other ancestor views. (In tvOS, the safe area reflects the area not covered the screen's bezel.) If the view is not currently installed in a view hierarchy, or is not yet visible onscreen, the layout guide edges are equal to the edges of the view.
As you try to add objects beyond safe area your content get chance clip by Device Bazels.
Example: When you add button outside safe area as
let buttonOutsideSafeArea = UIButton(frame: CGRect(x: 0, y: 100, width: 44, height: 40))
buttonOutsideSafeArea.backgroundColor = .red
self.view.addSubview(buttonOutsideSafeArea)
When you rotate right on device.
But it will get clipped(by Top Notch) when you rotate left
Hence try to avoid adding objects beyond safe Area

Jack
- 13,571
- 6
- 76
- 98