Skip to content

Commit

Permalink
display(iOS): make sure terminal does not overlap with safe area
Browse files Browse the repository at this point in the history
  • Loading branch information
osy committed Apr 23, 2023
1 parent de31b64 commit a50b7c8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Platform/iOS/Display/VMDisplayTerminalViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,11 @@ extension VMDisplayTerminalViewController {
if #available(iOS 15.0, *), useAutoLayout {
terminalView.translatesAutoresizingMaskIntoConstraints = false
terminalView.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor).isActive = true
terminalView.leftAnchor.constraint(equalTo: view.leftAnchor).isActive = true
terminalView.rightAnchor.constraint(equalTo: view.rightAnchor).isActive = true

terminalView.leftAnchor.constraint(equalTo: view.safeAreaLayoutGuide.leftAnchor).isActive = true
terminalView.rightAnchor.constraint(equalTo: view.safeAreaLayoutGuide.rightAnchor).isActive = true
terminalView.bottomAnchor.constraint(lessThanOrEqualTo: view.safeAreaLayoutGuide.bottomAnchor).isActive = true
terminalView.keyboardLayoutGuide.topAnchor.constraint(equalTo: terminalView.bottomAnchor).isActive = true
terminalView.keyboardLayoutGuide.bottomAnchor.constraint(equalTo: view.safeAreaLayoutGuide.bottomAnchor).isActive = true
} else {
NotificationCenter.default.addObserver(
self,
Expand Down

0 comments on commit a50b7c8

Please sign in to comment.